--- old/src/share/vm/prims/jni.cpp 2020-01-16 16:56:32.239409516 +0300 +++ new/src/share/vm/prims/jni.cpp 2020-01-16 16:56:32.191411065 +0300 @@ -32,8 +32,10 @@ #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "interpreter/linkResolver.hpp" +#if INCLUDE_JFR #include "jfr/jfrEvents.hpp" #include "jfr/support/jfrThreadId.hpp" +#endif #include "utilities/macros.hpp" #include "utilities/ostream.hpp" #if INCLUDE_ALL_GCS @@ -5020,6 +5022,7 @@ return &jni_NativeInterface; } +#if INCLUDE_JFR static void post_thread_start_event(const JavaThread* jt) { assert(jt != NULL, "invariant"); EventThreadStart event; @@ -5028,6 +5031,7 @@ event.commit(); } } +#endif // Invocation API @@ -5250,7 +5254,9 @@ JvmtiExport::post_thread_start(thread); } +#if INCLUDE_JFR post_thread_start_event(thread); +#endif #ifndef PRODUCT #ifndef CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED @@ -5461,7 +5467,9 @@ JvmtiExport::post_thread_start(thread); } +#if INCLUDE_JFR post_thread_start_event(thread); +#endif *(JNIEnv**)penv = thread->jni_environment();