112 perfMemory_init();
113 SuspendibleThreadSet_init();
114 ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
115 }
116
117
118 jint init_globals() {
119 management_init();
120 JvmtiExport::initialize_oop_storage();
121 #if INCLUDE_JVMTI
122 if (AlwaysRecordEvolDependencies) {
123 JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
124 JvmtiExport::set_all_dependencies_are_recorded(true);
125 }
126 #endif
127 bytecodes_init();
128 classLoader_init1();
129 compilationPolicy_init();
130 codeCache_init();
131 VM_Version_init(); // depends on codeCache_init for emitting code
132 icache_init2(); // depends on VM_Version for choosing the mechanism
133 // initialize stubs needed before we can init the universe
134 preuniverse_stubs_init();
135 jint status = universe_init(); // dependent on codeCache_init and preuniverse_stubs_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 AOTCodeCache::init2(); // depends on universe_init, must be before initial_stubs_init
147 AsyncLogWriter::initialize();
148
149 initial_stubs_init(); // initial stub routines
150 // stack overflow exception blob is referenced by the interpreter
151 SharedRuntime::generate_initial_stubs();
152 AOTCodeCache::init_early_stubs_table(); // need this after initial_stubs
153 gc_barrier_stubs_init(); // depends on universe_init, must be before interpreter_init
154 continuations_init(); // must precede continuation stub generation
155 continuation_stubs_init(); // depends on continuations_init
156 #if INCLUDE_JFR
157 SharedRuntime::generate_jfr_stubs();
158 #endif
159 interpreter_init_stub(); // before methods get loaded
160 accessFlags_init();
161 InterfaceSupport_init();
162 VMRegImpl::set_regName(); // need this before generate_stubs (for printing oop maps).
163 SharedRuntime::generate_stubs();
164 AOTCodeCache::init_shared_blobs_table(); // need this after generate_stubs
165 SharedRuntime::init_adapter_library(); // do this after AOTCodeCache::init_shared_blobs_table
166 return JNI_OK;
167 }
168
169 jint init_globals2() {
170 universe2_init(); // dependent on codeCache_init and initial_stubs_init
171 javaClasses_init(); // must happen after vtable initialization, before referenceProcessor_init
172 interpreter_init_code(); // after javaClasses_init and before any method gets linked
173 referenceProcessor_init();
174 jni_handles_init();
175 #if INCLUDE_VM_STRUCTS
176 vmStructs_init();
177 #endif // INCLUDE_VM_STRUCTS
178
179 vtableStubs_init();
180 if (!compilerOracle_init()) {
181 return JNI_EINVAL;
182 }
|
112 perfMemory_init();
113 SuspendibleThreadSet_init();
114 ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
115 }
116
117
118 jint init_globals() {
119 management_init();
120 JvmtiExport::initialize_oop_storage();
121 #if INCLUDE_JVMTI
122 if (AlwaysRecordEvolDependencies) {
123 JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
124 JvmtiExport::set_all_dependencies_are_recorded(true);
125 }
126 #endif
127 bytecodes_init();
128 classLoader_init1();
129 compilationPolicy_init();
130 codeCache_init();
131 VM_Version_init(); // depends on codeCache_init for emitting code
132 VMRegImpl::set_regName(); // need this before generate_stubs (for printing oop maps).
133 icache_init2(); // depends on VM_Version for choosing the mechanism
134 // initialize stubs needed before we can init the universe
135 preuniverse_stubs_init();
136 jint status = universe_init(); // dependent on codeCache_init and preuniverse_stubs_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 AOTCodeCache::init2(); // depends on universe_init, must be before initial_stubs_init
148 AsyncLogWriter::initialize();
149
150 initial_stubs_init(); // initial stub routines
151 // stack overflow exception blob is referenced by the interpreter
152 SharedRuntime::generate_initial_stubs();
153 AOTCodeCache::init_early_stubs_table(); // need this after initial_stubs
154 gc_barrier_stubs_init(); // depends on universe_init, must be before interpreter_init
155 continuations_init(); // must precede continuation stub generation
156 continuation_stubs_init(); // depends on continuations_init
157 #if INCLUDE_JFR
158 SharedRuntime::generate_jfr_stubs();
159 #endif
160 interpreter_init_stub(); // before methods get loaded
161 accessFlags_init();
162 InterfaceSupport_init();
163 SharedRuntime::generate_stubs();
164 AOTCodeCache::init_shared_blobs_table(); // need this after generate_stubs
165 SharedRuntime::init_adapter_library(); // do this after AOTCodeCache::init_shared_blobs_table
166 return JNI_OK;
167 }
168
169 jint init_globals2() {
170 universe2_init(); // dependent on codeCache_init and initial_stubs_init
171 javaClasses_init(); // must happen after vtable initialization, before referenceProcessor_init
172 interpreter_init_code(); // after javaClasses_init and before any method gets linked
173 referenceProcessor_init();
174 jni_handles_init();
175 #if INCLUDE_VM_STRUCTS
176 vmStructs_init();
177 #endif // INCLUDE_VM_STRUCTS
178
179 vtableStubs_init();
180 if (!compilerOracle_init()) {
181 return JNI_EINVAL;
182 }
|