diff -r 2251ba078bec -r eb7ce841ccec src/share/vm/runtime/thread.cpp --- a/src/share/vm/runtime/thread.cpp Sat Oct 24 16:18:50 2020 +0800 +++ b/src/share/vm/runtime/thread.cpp Sat Oct 24 16:43:47 2020 +0800 @@ -3446,7 +3446,7 @@ return status; } - JFR_ONLY(Jfr::on_create_vm_1();) + JFR_ONLY(Jfr::on_vm_init();) #if defined MIPS && !defined ZERO /* 2013/11/5 Jin: To be accessed in NativeGeneralJump::patch_verified_entry() */ @@ -3502,16 +3502,12 @@ ShouldNotReachHere(); } -#if !INCLUDE_JFR - // if JFR is not enabled at the build time keep the original JvmtiExport location - // Always call even when there are not JVMTI environments yet, since environments // may be attached late and JVMTI must track phases of VM execution JvmtiExport::enter_start_phase(); // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents. JvmtiExport::post_vm_start(); -#endif { TraceTime timer("Initialize java.lang classes", TraceStartupTime); @@ -3558,19 +3554,6 @@ initialize_class(vmSymbols::java_lang_IllegalArgumentException(), CHECK_0); } - JFR_ONLY( - Jfr::on_create_vm_2(); - - // if JFR is enabled at build time the JVMTI needs to be handled only after on_create_vm_2() call - - // Always call even when there are not JVMTI environments yet, since environments - // may be attached late and JVMTI must track phases of VM execution - JvmtiExport::enter_start_phase(); - - // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents. - JvmtiExport::post_vm_start(); - ) - // See : bugid 4211085. // Background : the static initializer of java.lang.Compiler tries to read // property"java.compiler" and read & write property "java.vm.info". @@ -3665,7 +3648,7 @@ // Notify JVMTI agents that VM initialization is complete - nop if no agents. JvmtiExport::post_vm_initialized(); - JFR_ONLY(Jfr::on_create_vm_3();) + JFR_ONLY(Jfr::on_vm_start();) if (CleanChunkPoolAsync) { Chunk::start_chunk_pool_cleaner_task();