< prev index next >

src/hotspot/share/runtime/init.cpp

Print this page
rev 59470 : 8153224.v2.1[12].patch merged with 8153224.v2.13.patch.


 155   stubRoutines_init2(); // note: StubRoutines need 2-phase init
 156   MethodHandles::generate_adapters();
 157 
 158   // All the flags that get adjusted by VM_Version_init and os::init_2
 159   // have been set so dump the flags now.
 160   if (PrintFlagsFinal || PrintFlagsRanges) {
 161     JVMFlag::printFlags(tty, false, PrintFlagsRanges);
 162   }
 163 
 164   return JNI_OK;
 165 }
 166 
 167 
 168 void exit_globals() {
 169   static bool destructorsCalled = false;
 170   if (!destructorsCalled) {
 171     destructorsCalled = true;
 172     if (log_is_enabled(Info, monitorinflation)) {
 173       // The ObjectMonitor subsystem uses perf counters so
 174       // do this before perfMemory_exit().
 175       // ObjectSynchronizer::finish_deflate_idle_monitors()'s call
 176       // to audit_and_print_stats() is done at the Debug level.




 177       ObjectSynchronizer::audit_and_print_stats(true /* on_exit */);
 178     }
 179     perfMemory_exit();
 180     SafepointTracing::statistics_exit_log();
 181     if (PrintStringTableStatistics) {
 182       SymbolTable::dump(tty);
 183       StringTable::dump(tty);
 184     }
 185     ostream_exit();
 186   }
 187 }
 188 
 189 static volatile bool _init_completed = false;
 190 
 191 bool is_init_completed() {
 192   return Atomic::load_acquire(&_init_completed);
 193 }
 194 
 195 void wait_init_completed() {
 196   MonitorLocker ml(InitCompleted_lock, Monitor::_no_safepoint_check_flag);


 155   stubRoutines_init2(); // note: StubRoutines need 2-phase init
 156   MethodHandles::generate_adapters();
 157 
 158   // All the flags that get adjusted by VM_Version_init and os::init_2
 159   // have been set so dump the flags now.
 160   if (PrintFlagsFinal || PrintFlagsRanges) {
 161     JVMFlag::printFlags(tty, false, PrintFlagsRanges);
 162   }
 163 
 164   return JNI_OK;
 165 }
 166 
 167 
 168 void exit_globals() {
 169   static bool destructorsCalled = false;
 170   if (!destructorsCalled) {
 171     destructorsCalled = true;
 172     if (log_is_enabled(Info, monitorinflation)) {
 173       // The ObjectMonitor subsystem uses perf counters so
 174       // do this before perfMemory_exit().
 175       // These other two audit_and_print_stats() calls are done at the
 176       // Debug level at a safepoint:
 177       // - for safepoint based deflation auditing:
 178       //   ObjectSynchronizer::finish_deflate_idle_monitors()
 179       // - for async deflation auditing:
 180       //   ObjectSynchronizer::do_safepoint_work()
 181       ObjectSynchronizer::audit_and_print_stats(true /* on_exit */);
 182     }
 183     perfMemory_exit();
 184     SafepointTracing::statistics_exit_log();
 185     if (PrintStringTableStatistics) {
 186       SymbolTable::dump(tty);
 187       StringTable::dump(tty);
 188     }
 189     ostream_exit();
 190   }
 191 }
 192 
 193 static volatile bool _init_completed = false;
 194 
 195 bool is_init_completed() {
 196   return Atomic::load_acquire(&_init_completed);
 197 }
 198 
 199 void wait_init_completed() {
 200   MonitorLocker ml(InitCompleted_lock, Monitor::_no_safepoint_check_flag);
< prev index next >