108 perfMemory_init();
109 SuspendibleThreadSet_init();
110 ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
111 }
112
113
114 jint init_globals() {
115 management_init();
116 JvmtiExport::initialize_oop_storage();
117 #if INCLUDE_JVMTI
118 if (AlwaysRecordEvolDependencies) {
119 JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
120 JvmtiExport::set_all_dependencies_are_recorded(true);
121 }
122 #endif
123 bytecodes_init();
124 classLoader_init1();
125 compilationPolicy_init();
126 codeCache_init();
127 VM_Version_init(); // depends on codeCache_init for emitting code
128 // stub routines in initial blob are referenced by later generated code
129 initial_stubs_init();
130 // stack overflow exception blob is referenced by the interpreter
131 SharedRuntime::generate_initial_stubs();
132 jint status = universe_init(); // dependent on codeCache_init and
133 // initial_stubs_init and metaspace_init.
134 if (status != JNI_OK)
135 return status;
136
137 #ifdef LEAK_SANITIZER
138 {
139 // Register the Java heap with LSan.
140 VirtualSpaceSummary summary = Universe::heap()->create_heap_space_summary();
141 LSAN_REGISTER_ROOT_REGION(summary.start(), summary.reserved_size());
142 }
143 #endif // LEAK_SANITIZER
144
145 AsyncLogWriter::initialize();
146 gc_barrier_stubs_init(); // depends on universe_init, must be before interpreter_init
147 continuations_init(); // must precede continuation stub generation
148 continuation_stubs_init(); // depends on continuations_init
149 #if INCLUDE_JFR
150 SharedRuntime::generate_jfr_stubs();
151 #endif
152 interpreter_init_stub(); // before methods get loaded
153 accessFlags_init();
154 InterfaceSupport_init();
155 VMRegImpl::set_regName(); // need this before generate_stubs (for printing oop maps).
156 SharedRuntime::generate_stubs();
157 return JNI_OK;
158 }
159
160 jint init_globals2() {
161 universe2_init(); // dependent on codeCache_init and initial_stubs_init
162 javaClasses_init(); // must happen after vtable initialization, before referenceProcessor_init
163 interpreter_init_code(); // after javaClasses_init and before any method gets linked
164 referenceProcessor_init();
165 jni_handles_init();
166 #if INCLUDE_VM_STRUCTS
167 vmStructs_init();
168 #endif // INCLUDE_VM_STRUCTS
169
170 vtableStubs_init();
171 if (!compilerOracle_init()) {
172 return JNI_EINVAL;
173 }
174 dependencyContext_init();
175 dependencies_init();
|
108 perfMemory_init();
109 SuspendibleThreadSet_init();
110 ExternalsRecorder_init(); // After mutex_init() and before CodeCache_init
111 }
112
113
114 jint init_globals() {
115 management_init();
116 JvmtiExport::initialize_oop_storage();
117 #if INCLUDE_JVMTI
118 if (AlwaysRecordEvolDependencies) {
119 JvmtiExport::set_can_hotswap_or_post_breakpoint(true);
120 JvmtiExport::set_all_dependencies_are_recorded(true);
121 }
122 #endif
123 bytecodes_init();
124 classLoader_init1();
125 compilationPolicy_init();
126 codeCache_init();
127 VM_Version_init(); // depends on codeCache_init for emitting code
128 VMRegImpl::set_regName(); // need this before generate_stubs (for printing oop maps).
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 SharedRuntime::generate_stubs();
157 return JNI_OK;
158 }
159
160 jint init_globals2() {
161 universe2_init(); // dependent on codeCache_init and initial_stubs_init
162 javaClasses_init(); // must happen after vtable initialization, before referenceProcessor_init
163 interpreter_init_code(); // after javaClasses_init and before any method gets linked
164 referenceProcessor_init();
165 jni_handles_init();
166 #if INCLUDE_VM_STRUCTS
167 vmStructs_init();
168 #endif // INCLUDE_VM_STRUCTS
169
170 vtableStubs_init();
171 if (!compilerOracle_init()) {
172 return JNI_EINVAL;
173 }
174 dependencyContext_init();
175 dependencies_init();
|