src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp Sdiff src/share/vm/runtime

src/share/vm/runtime/thread.cpp

Print this page
rev 5067 : 8022595: JSR292: deadlock during class loading of MethodHandles, MethodHandleImpl & MethodHandleNatives
Reviewed-by:


3619   if (!EagerXrunInit && Arguments::init_libraries_at_startup()) {
3620     create_vm_init_libraries();
3621   }
3622 
3623   // Notify JVMTI agents that VM initialization is complete - nop if no agents.
3624   JvmtiExport::post_vm_initialized();
3625 
3626   if (TRACE_START() != JNI_OK) {
3627     vm_exit_during_initialization("Failed to start tracing backend.");
3628   }
3629 
3630   if (CleanChunkPoolAsync) {
3631     Chunk::start_chunk_pool_cleaner_task();
3632   }
3633 
3634   // initialize compiler(s)
3635 #if defined(COMPILER1) || defined(COMPILER2) || defined(SHARK)
3636   CompileBroker::compilation_init();
3637 #endif
3638 










3639 #if INCLUDE_MANAGEMENT
3640   Management::initialize(THREAD);
3641 #endif // INCLUDE_MANAGEMENT
3642 
3643   if (HAS_PENDING_EXCEPTION) {
3644     // management agent fails to start possibly due to
3645     // configuration problem and is responsible for printing
3646     // stack trace if appropriate. Simply exit VM.
3647     vm_exit(1);
3648   }
3649 
3650   if (Arguments::has_profile())       FlatProfiler::engage(main_thread, true);
3651   if (MemProfiling)                   MemProfiler::engage();
3652   StatSampler::engage();
3653   if (CheckJNICalls)                  JniPeriodicChecker::engage();
3654 
3655   BiasedLocking::init();
3656 
3657   if (JDK_Version::current().post_vm_init_hook_enabled()) {
3658     call_postVMInitHook(THREAD);




3619   if (!EagerXrunInit && Arguments::init_libraries_at_startup()) {
3620     create_vm_init_libraries();
3621   }
3622 
3623   // Notify JVMTI agents that VM initialization is complete - nop if no agents.
3624   JvmtiExport::post_vm_initialized();
3625 
3626   if (TRACE_START() != JNI_OK) {
3627     vm_exit_during_initialization("Failed to start tracing backend.");
3628   }
3629 
3630   if (CleanChunkPoolAsync) {
3631     Chunk::start_chunk_pool_cleaner_task();
3632   }
3633 
3634   // initialize compiler(s)
3635 #if defined(COMPILER1) || defined(COMPILER2) || defined(SHARK)
3636   CompileBroker::compilation_init();
3637 #endif
3638 
3639   if (EnableInvokeDynamic) {
3640     // Pre-initialize some JSR292 core classes to avoid deadlock during class loading.
3641     // It is done after compilers are initialized, because otherwise compilations of
3642     // signature polymorphic MH intrinsics can be missed
3643     // (see SystemDictionary::find_method_handle_intrinsic).
3644     initialize_class(vmSymbols::java_lang_invoke_MethodHandle(), CHECK_0);
3645     initialize_class(vmSymbols::java_lang_invoke_MemberName(), CHECK_0);
3646     initialize_class(vmSymbols::java_lang_invoke_MethodHandleNatives(), CHECK_0);
3647   }
3648 
3649 #if INCLUDE_MANAGEMENT
3650   Management::initialize(THREAD);
3651 #endif // INCLUDE_MANAGEMENT
3652 
3653   if (HAS_PENDING_EXCEPTION) {
3654     // management agent fails to start possibly due to
3655     // configuration problem and is responsible for printing
3656     // stack trace if appropriate. Simply exit VM.
3657     vm_exit(1);
3658   }
3659 
3660   if (Arguments::has_profile())       FlatProfiler::engage(main_thread, true);
3661   if (MemProfiling)                   MemProfiler::engage();
3662   StatSampler::engage();
3663   if (CheckJNICalls)                  JniPeriodicChecker::engage();
3664 
3665   BiasedLocking::init();
3666 
3667   if (JDK_Version::current().post_vm_init_hook_enabled()) {
3668     call_postVMInitHook(THREAD);


src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File