< prev index next >

src/share/vm/runtime/thread.cpp

Print this page




3753   // Pre-initialize some JSR292 core classes to avoid deadlock during class loading.
3754   // It is done after compilers are initialized, because otherwise compilations of
3755   // signature polymorphic MH intrinsics can be missed
3756   // (see SystemDictionary::find_method_handle_intrinsic).
3757   initialize_jsr292_core_classes(CHECK_JNI_ERR);
3758 
3759   // This will initialize the module system.  Only java.base classes can be
3760   // loaded until phase 2 completes
3761   call_initPhase2(CHECK_JNI_ERR);
3762 
3763   // Always call even when there are not JVMTI environments yet, since environments
3764   // may be attached late and JVMTI must track phases of VM execution
3765   JvmtiExport::enter_start_phase();
3766 
3767   // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents.
3768   JvmtiExport::post_vm_start();
3769 
3770   // Final system initialization including security manager and system class loader
3771   call_initPhase3(CHECK_JNI_ERR);
3772 



3773 #if INCLUDE_JVMCI
3774   if (EnableJVMCI && UseJVMCICompiler && (!UseInterpreter || !BackgroundCompilation)) {
3775     // 8145270: Force initialization of JVMCI runtime otherwise requests for blocking
3776     // compilations via JVMCI will not actually block until JVMCI is initialized.
3777     JVMCIRuntime::force_initialization(CHECK_JNI_ERR);
3778   }
3779 #endif
3780   // cache the system class loader
3781   SystemDictionary::compute_java_system_loader(CHECK_(JNI_ERR));
3782 
3783   // Always call even when there are not JVMTI environments yet, since environments
3784   // may be attached late and JVMTI must track phases of VM execution
3785   JvmtiExport::enter_live_phase();
3786 
3787   // Notify JVMTI agents that VM initialization is complete - nop if no agents.
3788   JvmtiExport::post_vm_initialized();
3789 
3790   if (TRACE_START() != JNI_OK) {
3791     vm_exit_during_initialization("Failed to start tracing backend.");
3792   }
3793 
3794 #if INCLUDE_MANAGEMENT
3795   Management::initialize(THREAD);
3796 
3797   if (HAS_PENDING_EXCEPTION) {
3798     // management agent fails to start possibly due to
3799     // configuration problem and is responsible for printing
3800     // stack trace if appropriate. Simply exit VM.
3801     vm_exit(1);




3753   // Pre-initialize some JSR292 core classes to avoid deadlock during class loading.
3754   // It is done after compilers are initialized, because otherwise compilations of
3755   // signature polymorphic MH intrinsics can be missed
3756   // (see SystemDictionary::find_method_handle_intrinsic).
3757   initialize_jsr292_core_classes(CHECK_JNI_ERR);
3758 
3759   // This will initialize the module system.  Only java.base classes can be
3760   // loaded until phase 2 completes
3761   call_initPhase2(CHECK_JNI_ERR);
3762 
3763   // Always call even when there are not JVMTI environments yet, since environments
3764   // may be attached late and JVMTI must track phases of VM execution
3765   JvmtiExport::enter_start_phase();
3766 
3767   // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents.
3768   JvmtiExport::post_vm_start();
3769 
3770   // Final system initialization including security manager and system class loader
3771   call_initPhase3(CHECK_JNI_ERR);
3772 
3773   // cache the system class loader
3774   SystemDictionary::compute_java_system_loader(CHECK_(JNI_ERR));
3775 
3776 #if INCLUDE_JVMCI
3777   if (EnableJVMCI && UseJVMCICompiler && (!UseInterpreter || !BackgroundCompilation)) {
3778     // 8145270: Force initialization of JVMCI runtime otherwise requests for blocking
3779     // compilations via JVMCI will not actually block until JVMCI is initialized.
3780     JVMCIRuntime::force_initialization(CHECK_JNI_ERR);
3781   }
3782 #endif


3783 
3784   // Always call even when there are not JVMTI environments yet, since environments
3785   // may be attached late and JVMTI must track phases of VM execution
3786   JvmtiExport::enter_live_phase();
3787 
3788   // Notify JVMTI agents that VM initialization is complete - nop if no agents.
3789   JvmtiExport::post_vm_initialized();
3790 
3791   if (TRACE_START() != JNI_OK) {
3792     vm_exit_during_initialization("Failed to start tracing backend.");
3793   }
3794 
3795 #if INCLUDE_MANAGEMENT
3796   Management::initialize(THREAD);
3797 
3798   if (HAS_PENDING_EXCEPTION) {
3799     // management agent fails to start possibly due to
3800     // configuration problem and is responsible for printing
3801     // stack trace if appropriate. Simply exit VM.
3802     vm_exit(1);


< prev index next >