111 InterfaceSupport_init(); 112 SharedRuntime::generate_stubs(); 113 universe2_init(); // dependent on codeCache_init and stubRoutines_init1 114 referenceProcessor_init(); 115 jni_handles_init(); 116 vmStructs_init(); 117 118 vtableStubs_init(); 119 InlineCacheBuffer_init(); 120 compilerOracle_init(); 121 compilationPolicy_init(); 122 compileBroker_init(); 123 VMRegImpl::set_regName(); 124 125 if (!universe_post_init()) { 126 return JNI_ERR; 127 } 128 javaClasses_init(); // must happen after vtable initialization 129 stubRoutines_init2(); // note: StubRoutines need 2-phase init 130 131 // Although we'd like to, we can't easily do a heap verify 132 // here because the main thread isn't yet a JavaThread, so 133 // its TLAB may not be made parseable from the usual interfaces. 134 if (VerifyBeforeGC && !UseTLAB && 135 Universe::heap()->total_collections() >= VerifyGCStartAt) { 136 Universe::heap()->prepare_for_verify(); 137 Universe::verify(); // make sure we're starting with a clean slate 138 } 139 140 // All the flags that get adjusted by VM_Version_init and os::init_2 141 // have been set so dump the flags now. 142 if (PrintFlagsFinal) { 143 CommandLineFlags::printFlags(tty, false); 144 } 145 146 return JNI_OK; 147 } 148 149 150 void exit_globals() { 151 static bool destructorsCalled = false; 152 if (!destructorsCalled) { 153 destructorsCalled = true; 154 perfMemory_exit(); 155 if (PrintSafepointStatistics) { 156 // Print the collected safepoint statistics. 157 SafepointSynchronize::print_stat_on_exit(); 158 } 159 if (PrintStringTableStatistics) { | 111 InterfaceSupport_init(); 112 SharedRuntime::generate_stubs(); 113 universe2_init(); // dependent on codeCache_init and stubRoutines_init1 114 referenceProcessor_init(); 115 jni_handles_init(); 116 vmStructs_init(); 117 118 vtableStubs_init(); 119 InlineCacheBuffer_init(); 120 compilerOracle_init(); 121 compilationPolicy_init(); 122 compileBroker_init(); 123 VMRegImpl::set_regName(); 124 125 if (!universe_post_init()) { 126 return JNI_ERR; 127 } 128 javaClasses_init(); // must happen after vtable initialization 129 stubRoutines_init2(); // note: StubRoutines need 2-phase init 130 131 // All the flags that get adjusted by VM_Version_init and os::init_2 132 // have been set so dump the flags now. 133 if (PrintFlagsFinal) { 134 CommandLineFlags::printFlags(tty, false); 135 } 136 137 return JNI_OK; 138 } 139 140 141 void exit_globals() { 142 static bool destructorsCalled = false; 143 if (!destructorsCalled) { 144 destructorsCalled = true; 145 perfMemory_exit(); 146 if (PrintSafepointStatistics) { 147 // Print the collected safepoint statistics. 148 SafepointSynchronize::print_stat_on_exit(); 149 } 150 if (PrintStringTableStatistics) { |