< prev index next >

src/hotspot/share/runtime/init.cpp

Print this page

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

129   icache_init2();                 // depends on VM_Version for choosing the mechanism
130   // stub routines in initial blob are referenced by later generated code
131   initial_stubs_init();
132   // stack overflow exception blob is referenced by the interpreter
133   SharedRuntime::generate_initial_stubs();
134   jint status = universe_init();  // dependent on codeCache_init and
135                                   // initial_stubs_init and metaspace_init.
136   if (status != JNI_OK)
137     return status;
138 
139 #ifdef LEAK_SANITIZER
140   {
141     // Register the Java heap with LSan.
142     VirtualSpaceSummary summary = Universe::heap()->create_heap_space_summary();
143     LSAN_REGISTER_ROOT_REGION(summary.start(), summary.reserved_size());
144   }
145 #endif // LEAK_SANITIZER
146 
147   AsyncLogWriter::initialize();
148   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
149   continuations_init();      // must precede continuation stub generation
150   continuation_stubs_init(); // depends on continuations_init
151 #if INCLUDE_JFR
152   SharedRuntime::generate_jfr_stubs();
153 #endif
154   interpreter_init_stub();   // before methods get loaded
155   accessFlags_init();
156   InterfaceSupport_init();
157   VMRegImpl::set_regName();  // need this before generate_stubs (for printing oop maps).
158   SharedRuntime::generate_stubs();
159   return JNI_OK;
160 }
161 
162 jint init_globals2() {
163   universe2_init();          // dependent on codeCache_init and initial_stubs_init
164   javaClasses_init();        // must happen after vtable initialization, before referenceProcessor_init
165   interpreter_init_code();   // after javaClasses_init and before any method gets linked
166   referenceProcessor_init();
167   jni_handles_init();
168 #if INCLUDE_VM_STRUCTS
169   vmStructs_init();
170 #endif // INCLUDE_VM_STRUCTS
171 
172   vtableStubs_init();
173   if (!compilerOracle_init()) {
174     return JNI_EINVAL;
175   }
176   dependencyContext_init();
177   dependencies_init();

109   perfMemory_init();
110   SuspendibleThreadSet_init();
111   ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
112 }
113 
114 
115 jint init_globals() {
116   management_init();
117   JvmtiExport::initialize_oop_storage();
118 #if INCLUDE_JVMTI
119   if (AlwaysRecordEvolDependencies) {
120     JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
121     JvmtiExport::set_all_dependencies_are_recorded(true);
122   }
123 #endif
124   bytecodes_init();
125   classLoader_init1();
126   compilationPolicy_init();
127   codeCache_init();
128   VM_Version_init();              // depends on codeCache_init for emitting code
129   VMRegImpl::set_regName();       // need this before generate_stubs (for printing oop maps).
130   icache_init2();                 // depends on VM_Version for choosing the mechanism
131   // stub routines in initial blob are referenced by later generated code
132   initial_stubs_init();
133   // stack overflow exception blob is referenced by the interpreter
134   SharedRuntime::generate_initial_stubs();
135   jint status = universe_init();  // dependent on codeCache_init and
136                                   // initial_stubs_init and metaspace_init.
137   if (status != JNI_OK)
138     return status;
139 
140 #ifdef LEAK_SANITIZER
141   {
142     // Register the Java heap with LSan.
143     VirtualSpaceSummary summary = Universe::heap()->create_heap_space_summary();
144     LSAN_REGISTER_ROOT_REGION(summary.start(), summary.reserved_size());
145   }
146 #endif // LEAK_SANITIZER
147 
148   AsyncLogWriter::initialize();
149   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
150   continuations_init();      // must precede continuation stub generation
151   continuation_stubs_init(); // depends on continuations_init
152 #if INCLUDE_JFR
153   SharedRuntime::generate_jfr_stubs();
154 #endif
155   interpreter_init_stub();   // before methods get loaded
156   accessFlags_init();
157   InterfaceSupport_init();

158   SharedRuntime::generate_stubs();
159   return JNI_OK;
160 }
161 
162 jint init_globals2() {
163   universe2_init();          // dependent on codeCache_init and initial_stubs_init
164   javaClasses_init();        // must happen after vtable initialization, before referenceProcessor_init
165   interpreter_init_code();   // after javaClasses_init and before any method gets linked
166   referenceProcessor_init();
167   jni_handles_init();
168 #if INCLUDE_VM_STRUCTS
169   vmStructs_init();
170 #endif // INCLUDE_VM_STRUCTS
171 
172   vtableStubs_init();
173   if (!compilerOracle_init()) {
174     return JNI_EINVAL;
175   }
176   dependencyContext_init();
177   dependencies_init();
< prev index next >