< prev index next >

src/share/vm/memory/universe.cpp

Print this page




1053 
1054   // Initialize performance counters for metaspaces
1055   MetaspaceCounters::initialize_performance_counters();
1056   CompressedClassSpaceCounters::initialize_performance_counters();
1057 
1058   MemoryService::add_metaspace_memory_pools();
1059 
1060   MemoryService::set_universe_heap(Universe::heap());
1061 #if INCLUDE_CDS
1062   SharedClassUtil::initialize(CHECK_false);
1063 #endif
1064   return true;
1065 }
1066 
1067 
1068 void Universe::compute_base_vtable_size() {
1069   _base_vtable_size = ClassLoader::compute_Object_vtable();
1070 }
1071 
1072 void Universe::print_on(outputStream* st) {

1073   st->print_cr("Heap");
1074   heap()->print_on(st);
1075 }
1076 
1077 void Universe::print_heap_at_SIGBREAK() {
1078   if (PrintHeapAtSIGBREAK) {
1079     MutexLocker hl(Heap_lock);
1080     print_on(tty);
1081     tty->cr();
1082     tty->flush();
1083   }
1084 }
1085 
1086 void Universe::print_heap_before_gc() {
1087   Log(gc, heap) log;
1088   if (log.is_debug()) {
1089     log.debug("Heap before GC invocations=%u (full %u):", heap()->total_collections(), heap()->total_full_collections());
1090     ResourceMark rm;
1091     heap()->print_on(log.debug_stream());
1092   }
1093 }
1094 
1095 void Universe::print_heap_after_gc() {
1096   Log(gc, heap) log;
1097   if (log.is_debug()) {
1098     log.debug("Heap after GC invocations=%u (full %u):", heap()->total_collections(), heap()->total_full_collections());
1099     ResourceMark rm;




1053 
1054   // Initialize performance counters for metaspaces
1055   MetaspaceCounters::initialize_performance_counters();
1056   CompressedClassSpaceCounters::initialize_performance_counters();
1057 
1058   MemoryService::add_metaspace_memory_pools();
1059 
1060   MemoryService::set_universe_heap(Universe::heap());
1061 #if INCLUDE_CDS
1062   SharedClassUtil::initialize(CHECK_false);
1063 #endif
1064   return true;
1065 }
1066 
1067 
1068 void Universe::compute_base_vtable_size() {
1069   _base_vtable_size = ClassLoader::compute_Object_vtable();
1070 }
1071 
1072 void Universe::print_on(outputStream* st) {
1073   GCMutexLocker hl(Heap_lock); // Heap_lock might be locked by caller thread.
1074   st->print_cr("Heap");
1075   heap()->print_on(st);
1076 }
1077 
1078 void Universe::print_heap_at_SIGBREAK() {
1079   if (PrintHeapAtSIGBREAK) {

1080     print_on(tty);
1081     tty->cr();
1082     tty->flush();
1083   }
1084 }
1085 
1086 void Universe::print_heap_before_gc() {
1087   Log(gc, heap) log;
1088   if (log.is_debug()) {
1089     log.debug("Heap before GC invocations=%u (full %u):", heap()->total_collections(), heap()->total_full_collections());
1090     ResourceMark rm;
1091     heap()->print_on(log.debug_stream());
1092   }
1093 }
1094 
1095 void Universe::print_heap_after_gc() {
1096   Log(gc, heap) log;
1097   if (log.is_debug()) {
1098     log.debug("Heap after GC invocations=%u (full %u):", heap()->total_collections(), heap()->total_full_collections());
1099     ResourceMark rm;


< prev index next >