1152 } 1153 1154 // This needs to be done before the first scavenge/gc, since 1155 // it's an input to soft ref clearing policy. 1156 { 1157 MutexLocker x(Heap_lock); 1158 Universe::update_heap_info_at_gc(); 1159 } 1160 1161 // ("weak") refs processing infrastructure initialization 1162 Universe::heap()->post_initialize(); 1163 1164 // Initialize performance counters for metaspaces 1165 MetaspaceCounters::initialize_performance_counters(); 1166 CompressedClassSpaceCounters::initialize_performance_counters(); 1167 1168 MemoryService::add_metaspace_memory_pools(); 1169 1170 MemoryService::set_universe_heap(Universe::_collectedHeap); 1171 #if INCLUDE_CDS 1172 if (UseSharedSpaces) { 1173 SharedClassUtil::initialize(CHECK_false); 1174 } 1175 #endif 1176 return true; 1177 } 1178 1179 1180 void Universe::compute_base_vtable_size() { 1181 _base_vtable_size = ClassLoader::compute_Object_vtable(); 1182 } 1183 1184 1185 // %%% The Universe::flush_foo methods belong in CodeCache. 1186 1187 // Flushes compiled methods dependent on dependee. 1188 void Universe::flush_dependents_on(instanceKlassHandle dependee) { 1189 assert_lock_strong(Compile_lock); 1190 1191 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; 1192 1193 // CodeCache can only be updated by a thread_in_VM and they will all be 1194 // stopped during the safepoint so CodeCache will be safe to update without | 1152 } 1153 1154 // This needs to be done before the first scavenge/gc, since 1155 // it's an input to soft ref clearing policy. 1156 { 1157 MutexLocker x(Heap_lock); 1158 Universe::update_heap_info_at_gc(); 1159 } 1160 1161 // ("weak") refs processing infrastructure initialization 1162 Universe::heap()->post_initialize(); 1163 1164 // Initialize performance counters for metaspaces 1165 MetaspaceCounters::initialize_performance_counters(); 1166 CompressedClassSpaceCounters::initialize_performance_counters(); 1167 1168 MemoryService::add_metaspace_memory_pools(); 1169 1170 MemoryService::set_universe_heap(Universe::_collectedHeap); 1171 #if INCLUDE_CDS 1172 SharedClassUtil::initialize(CHECK_false); 1173 #endif 1174 return true; 1175 } 1176 1177 1178 void Universe::compute_base_vtable_size() { 1179 _base_vtable_size = ClassLoader::compute_Object_vtable(); 1180 } 1181 1182 1183 // %%% The Universe::flush_foo methods belong in CodeCache. 1184 1185 // Flushes compiled methods dependent on dependee. 1186 void Universe::flush_dependents_on(instanceKlassHandle dependee) { 1187 assert_lock_strong(Compile_lock); 1188 1189 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; 1190 1191 // CodeCache can only be updated by a thread_in_VM and they will all be 1192 // stopped during the safepoint so CodeCache will be safe to update without |