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