src/share/vm/memory/universe.cpp

Print this page
rev 4801 : 8013590: NPG: Add a memory pool MXBean for Metaspace


1079   Universe::_loader_addClass_cache->init(
1080     SystemDictionary::ClassLoader_klass(), m, CHECK_false);
1081 
1082   // The folowing is initializing converter functions for serialization in
1083   // JVM.cpp. If we clean up the StrictMath code above we may want to find
1084   // a better solution for this as well.
1085   initialize_converter_functions();
1086 
1087   // This needs to be done before the first scavenge/gc, since
1088   // it's an input to soft ref clearing policy.
1089   {
1090     MutexLocker x(Heap_lock);
1091     Universe::update_heap_info_at_gc();
1092   }
1093 
1094   // ("weak") refs processing infrastructure initialization
1095   Universe::heap()->post_initialize();
1096 
1097   // Initialize performance counters for metaspaces
1098   MetaspaceCounters::initialize_performance_counters();

1099 
1100   GC_locker::unlock();  // allow gc after bootstrapping
1101 
1102   MemoryService::set_universe_heap(Universe::_collectedHeap);
1103   return true;
1104 }
1105 
1106 
1107 void Universe::compute_base_vtable_size() {
1108   _base_vtable_size = ClassLoader::compute_Object_vtable();
1109 }
1110 
1111 
1112 // %%% The Universe::flush_foo methods belong in CodeCache.
1113 
1114 // Flushes compiled methods dependent on dependee.
1115 void Universe::flush_dependents_on(instanceKlassHandle dependee) {
1116   assert_lock_strong(Compile_lock);
1117 
1118   if (CodeCache::number_of_nmethods_with_dependencies() == 0) return;




1079   Universe::_loader_addClass_cache->init(
1080     SystemDictionary::ClassLoader_klass(), m, CHECK_false);
1081 
1082   // The folowing is initializing converter functions for serialization in
1083   // JVM.cpp. If we clean up the StrictMath code above we may want to find
1084   // a better solution for this as well.
1085   initialize_converter_functions();
1086 
1087   // This needs to be done before the first scavenge/gc, since
1088   // it's an input to soft ref clearing policy.
1089   {
1090     MutexLocker x(Heap_lock);
1091     Universe::update_heap_info_at_gc();
1092   }
1093 
1094   // ("weak") refs processing infrastructure initialization
1095   Universe::heap()->post_initialize();
1096 
1097   // Initialize performance counters for metaspaces
1098   MetaspaceCounters::initialize_performance_counters();
1099   MemoryService::add_metaspace_memory_pools();
1100 
1101   GC_locker::unlock();  // allow gc after bootstrapping
1102 
1103   MemoryService::set_universe_heap(Universe::_collectedHeap);
1104   return true;
1105 }
1106 
1107 
1108 void Universe::compute_base_vtable_size() {
1109   _base_vtable_size = ClassLoader::compute_Object_vtable();
1110 }
1111 
1112 
1113 // %%% The Universe::flush_foo methods belong in CodeCache.
1114 
1115 // Flushes compiled methods dependent on dependee.
1116 void Universe::flush_dependents_on(instanceKlassHandle dependee) {
1117   assert_lock_strong(Compile_lock);
1118 
1119   if (CodeCache::number_of_nmethods_with_dependencies() == 0) return;