< prev index next >

src/hotspot/share/runtime/init.cpp

Print this page

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

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

113   perfMemory_init();
114   SuspendibleThreadSet_init();
115   ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
116 }
117 
118 
119 jint init_globals() {
120   management_init();
121   JvmtiExport::initialize_oop_storage();
122 #if INCLUDE_JVMTI
123   if (AlwaysRecordEvolDependencies) {
124     JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
125     JvmtiExport::set_all_dependencies_are_recorded(true);
126   }
127 #endif
128   bytecodes_init();
129   classLoader_init1();
130   compilationPolicy_init();
131   codeCache_init();
132   VM_Version_init();              // depends on codeCache_init for emitting code
133   VMRegImpl::set_regName();       // need this before generate_stubs (for printing oop maps).
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   initial_stubs_init();      // stubgen initial stub routines
154   // stack overflow exception blob is referenced by the interpreter
155   AOTCodeCache::init_early_stubs_table();  // need this after stubgen initial stubs and before shared runtime initial stubs
156   SharedRuntime::generate_initial_stubs();
157   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
158   continuations_init();      // must precede continuation stub generation
159   continuation_stubs_init(); // depends on continuations_init
160 #if INCLUDE_JFR
161   SharedRuntime::generate_jfr_stubs();
162 #endif
163   interpreter_init_stub();   // before methods get loaded
164   accessFlags_init();
165   InterfaceSupport_init();

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