< prev index next >

src/share/vm/memory/universe.cpp

Print this page




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

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




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

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


< prev index next >