< prev index next >

src/hotspot/share/runtime/init.cpp

Print this page

117   perfMemory_init();
118   SuspendibleThreadSet_init();
119   ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
120 }
121 
122 
123 jint init_globals() {
124   management_init();
125   JvmtiExport::initialize_oop_storage();
126 #if INCLUDE_JVMTI
127   if (AlwaysRecordEvolDependencies) {
128     JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
129     JvmtiExport::set_all_dependencies_are_recorded(true);
130   }
131 #endif
132   bytecodes_init();
133   classLoader_init1();
134   compilationPolicy_init();
135   codeCache_init();
136   VM_Version_init();              // depends on codeCache_init for emitting code

137   icache_init2();                 // depends on VM_Version for choosing the mechanism
138   // ensure we know about all blobs, stubs and entries
139   initialize_stub_info();
140   // initialize stubs needed before we can init the universe
141   preuniverse_stubs_init();
142   jint status = universe_init();  // dependent on codeCache_init and preuniverse_stubs_init
143   if (status != JNI_OK) {
144     return status;
145   }
146 #ifdef LEAK_SANITIZER
147   {
148     // Register the Java heap with LSan.
149     VirtualSpaceSummary summary = Universe::heap()->create_heap_space_summary();
150     LSAN_REGISTER_ROOT_REGION(summary.start(), summary.reserved_size());
151   }
152 #endif // LEAK_SANITIZER
153   AOTCodeCache::init2();     // depends on universe_init, must be before initial_stubs_init
154   AsyncLogWriter::initialize();
155 
156 #if INCLUDE_CDS
157   stubs_AOTAddressTable_init(); // publish external addresses used by stubs
158                                 // depends on AOTCodeCache::init2
159 #endif // INCLUDE_CDS
160   initial_stubs_init();      // stubgen initial stub routines
161   // stack overflow exception blob is referenced by the interpreter
162   SharedRuntime::generate_initial_stubs();
163   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
164   continuations_init();      // must precede continuation stub generation
165   AOTCodeCache::init3();     // depends on stubs_AOTAddressTable_init
166                              // and continuations_init and must
167                              // precede continuation stub generation
168   continuation_stubs_init(); // depends on continuations_init and AOTCodeCache::init3
169 #if INCLUDE_JFR
170   SharedRuntime::generate_jfr_stubs();
171 #endif
172   interpreter_init_stub();   // before methods get loaded
173   accessFlags_init();
174   InterfaceSupport_init();
175   VMRegImpl::set_regName();  // need this before generate_stubs (for printing oop maps).
176   SharedRuntime::generate_stubs();
177   SharedRuntime::init_adapter_library(); // do this after AOTCodeCache::init_shared_blobs_table
178   return JNI_OK;
179 }
180 
181 jint init_globals2() {
182   universe2_init();          // dependent on codeCache_init and initial_stubs_init
183   javaClasses_init();        // must happen after vtable initialization, before referenceProcessor_init
184   interpreter_init_code();   // after javaClasses_init and before any method gets linked
185   referenceProcessor_init();
186   jni_handles_init();
187 #if INCLUDE_VM_STRUCTS
188   vmStructs_init();
189 #endif // INCLUDE_VM_STRUCTS
190 
191   vtableStubs_init();
192   if (!compilerOracle_init()) {
193     return JNI_EINVAL;
194   }
195   dependencyContext_init();

117   perfMemory_init();
118   SuspendibleThreadSet_init();
119   ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
120 }
121 
122 
123 jint init_globals() {
124   management_init();
125   JvmtiExport::initialize_oop_storage();
126 #if INCLUDE_JVMTI
127   if (AlwaysRecordEvolDependencies) {
128     JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
129     JvmtiExport::set_all_dependencies_are_recorded(true);
130   }
131 #endif
132   bytecodes_init();
133   classLoader_init1();
134   compilationPolicy_init();
135   codeCache_init();
136   VM_Version_init();              // depends on codeCache_init for emitting code
137   VMRegImpl::set_regName();       // need this before generate_stubs (for printing oop maps).
138   icache_init2();                 // depends on VM_Version for choosing the mechanism
139   // ensure we know about all blobs, stubs and entries
140   initialize_stub_info();
141   // initialize stubs needed before we can init the universe
142   preuniverse_stubs_init();
143   jint status = universe_init();  // dependent on codeCache_init and preuniverse_stubs_init
144   if (status != JNI_OK) {
145     return status;
146   }
147 #ifdef LEAK_SANITIZER
148   {
149     // Register the Java heap with LSan.
150     VirtualSpaceSummary summary = Universe::heap()->create_heap_space_summary();
151     LSAN_REGISTER_ROOT_REGION(summary.start(), summary.reserved_size());
152   }
153 #endif // LEAK_SANITIZER
154   AOTCodeCache::init2();     // depends on universe_init, must be before initial_stubs_init
155   AsyncLogWriter::initialize();
156 
157 #if INCLUDE_CDS
158   stubs_AOTAddressTable_init(); // publish external addresses used by stubs
159                                 // depends on AOTCodeCache::init2
160 #endif // INCLUDE_CDS
161   initial_stubs_init();      // stubgen initial stub routines
162   // stack overflow exception blob is referenced by the interpreter
163   SharedRuntime::generate_initial_stubs();
164   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
165   continuations_init();      // must precede continuation stub generation
166   AOTCodeCache::init3();     // depends on stubs_AOTAddressTable_init
167                              // and continuations_init and must
168                              // precede continuation stub generation
169   continuation_stubs_init(); // depends on continuations_init and AOTCodeCache::init3
170 #if INCLUDE_JFR
171   SharedRuntime::generate_jfr_stubs();
172 #endif
173   interpreter_init_stub();   // before methods get loaded
174   accessFlags_init();
175   InterfaceSupport_init();

176   SharedRuntime::generate_stubs();
177   SharedRuntime::init_adapter_library(); // do this after AOTCodeCache::init_shared_blobs_table
178   return JNI_OK;
179 }
180 
181 jint init_globals2() {
182   universe2_init();          // dependent on codeCache_init and initial_stubs_init
183   javaClasses_init();        // must happen after vtable initialization, before referenceProcessor_init
184   interpreter_init_code();   // after javaClasses_init and before any method gets linked
185   referenceProcessor_init();
186   jni_handles_init();
187 #if INCLUDE_VM_STRUCTS
188   vmStructs_init();
189 #endif // INCLUDE_VM_STRUCTS
190 
191   vtableStubs_init();
192   if (!compilerOracle_init()) {
193     return JNI_EINVAL;
194   }
195   dependencyContext_init();
< prev index next >