< prev index next >

src/hotspot/share/runtime/init.cpp

Print this page

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

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

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

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