< prev index next >

src/hotspot/share/runtime/init.cpp

Print this page
rev 54321 : 8221482: Initialize VMRegImpl::regName[] earlier to prevent assert during PrintStubCode
Reviewed-by:


 105   HandleMark hm;
 106   management_init();
 107   bytecodes_init();
 108   classLoader_init1();
 109   compilationPolicy_init();
 110   codeCache_init();
 111   VM_Version_init();
 112   os_init_globals();
 113   stubRoutines_init1();
 114   jint status = universe_init();  // dependent on codeCache_init and
 115                                   // stubRoutines_init1 and metaspace_init.
 116   if (status != JNI_OK)
 117     return status;
 118 
 119   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
 120   interpreter_init();        // before any methods loaded
 121   invocationCounter_init();  // before any methods loaded
 122   accessFlags_init();
 123   templateTable_init();
 124   InterfaceSupport_init();

 125   SharedRuntime::generate_stubs();
 126   universe2_init();  // dependent on codeCache_init and stubRoutines_init1
 127   javaClasses_init();// must happen after vtable initialization, before referenceProcessor_init
 128   referenceProcessor_init();
 129   jni_handles_init();
 130 #if INCLUDE_VM_STRUCTS
 131   vmStructs_init();
 132 #endif // INCLUDE_VM_STRUCTS
 133 
 134   vtableStubs_init();
 135   InlineCacheBuffer_init();
 136   compilerOracle_init();
 137   dependencyContext_init();
 138 
 139   if (!compileBroker_init()) {
 140     return JNI_EINVAL;
 141   }
 142   VMRegImpl::set_regName();
 143 
 144   if (!universe_post_init()) {
 145     return JNI_ERR;
 146   }
 147   stubRoutines_init2(); // note: StubRoutines need 2-phase init
 148   MethodHandles::generate_adapters();
 149 
 150 #if INCLUDE_NMT
 151   // Solaris stack is walkable only after stubRoutines are set up.
 152   // On Other platforms, the stack is always walkable.
 153   NMT_stack_walkable = true;
 154 #endif // INCLUDE_NMT
 155 
 156   // All the flags that get adjusted by VM_Version_init and os::init_2
 157   // have been set so dump the flags now.
 158   if (PrintFlagsFinal || PrintFlagsRanges) {
 159     JVMFlag::printFlags(tty, false, PrintFlagsRanges);
 160   }
 161 
 162   return JNI_OK;




 105   HandleMark hm;
 106   management_init();
 107   bytecodes_init();
 108   classLoader_init1();
 109   compilationPolicy_init();
 110   codeCache_init();
 111   VM_Version_init();
 112   os_init_globals();
 113   stubRoutines_init1();
 114   jint status = universe_init();  // dependent on codeCache_init and
 115                                   // stubRoutines_init1 and metaspace_init.
 116   if (status != JNI_OK)
 117     return status;
 118 
 119   gc_barrier_stubs_init();   // depends on universe_init, must be before interpreter_init
 120   interpreter_init();        // before any methods loaded
 121   invocationCounter_init();  // before any methods loaded
 122   accessFlags_init();
 123   templateTable_init();
 124   InterfaceSupport_init();
 125   VMRegImpl::set_regName();  // need this before generate_stubs (for printing oop maps).
 126   SharedRuntime::generate_stubs();
 127   universe2_init();  // dependent on codeCache_init and stubRoutines_init1
 128   javaClasses_init();// must happen after vtable initialization, before referenceProcessor_init
 129   referenceProcessor_init();
 130   jni_handles_init();
 131 #if INCLUDE_VM_STRUCTS
 132   vmStructs_init();
 133 #endif // INCLUDE_VM_STRUCTS
 134 
 135   vtableStubs_init();
 136   InlineCacheBuffer_init();
 137   compilerOracle_init();
 138   dependencyContext_init();
 139 
 140   if (!compileBroker_init()) {
 141     return JNI_EINVAL;
 142   }

 143 
 144   if (!universe_post_init()) {
 145     return JNI_ERR;
 146   }
 147   stubRoutines_init2(); // note: StubRoutines need 2-phase init
 148   MethodHandles::generate_adapters();
 149 
 150 #if INCLUDE_NMT
 151   // Solaris stack is walkable only after stubRoutines are set up.
 152   // On Other platforms, the stack is always walkable.
 153   NMT_stack_walkable = true;
 154 #endif // INCLUDE_NMT
 155 
 156   // All the flags that get adjusted by VM_Version_init and os::init_2
 157   // have been set so dump the flags now.
 158   if (PrintFlagsFinal || PrintFlagsRanges) {
 159     JVMFlag::printFlags(tty, false, PrintFlagsRanges);
 160   }
 161 
 162   return JNI_OK;


< prev index next >