--- old/src/share/vm/prims/unsafe.cpp 2020-01-16 16:56:32.723393899 +0300 +++ new/src/share/vm/prims/unsafe.cpp 2020-01-16 16:56:32.679395318 +0300 @@ -28,7 +28,9 @@ #if INCLUDE_ALL_GCS #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #endif // INCLUDE_ALL_GCS +#if INCLUDE_JFR #include "jfr/jfrEvents.hpp" +#endif #include "memory/allocation.inline.hpp" #include "prims/jni.h" #include "prims/jvm.h" @@ -1236,6 +1238,7 @@ #endif UNSAFE_END +#if INCLUDE_JFR static void post_thread_park_event(EventThreadPark* event, const oop obj, jlong timeout_nanos, jlong until_epoch_millis) { assert(event != NULL, "invariant"); assert(event->should_commit(), "invariant"); @@ -1245,10 +1248,13 @@ event->set_address((obj != NULL) ? (u8)cast_from_oop(obj) : 0); event->commit(); } +#endif UNSAFE_ENTRY(void, Unsafe_Park(JNIEnv *env, jobject unsafe, jboolean isAbsolute, jlong time)) UnsafeWrapper("Unsafe_Park"); +#if INCLUDE_JFR EventThreadPark event; +#endif #ifndef USDT2 HS_DTRACE_PROBE3(hotspot, thread__park__begin, thread->parker(), (int) isAbsolute, time); #else /* USDT2 */ @@ -1263,6 +1269,7 @@ HOTSPOT_THREAD_PARK_END( (uintptr_t) thread->parker()); #endif /* USDT2 */ +#if INCLUDE_JFR if (event.should_commit()) { const oop obj = thread->current_park_blocker(); if (time == 0) { @@ -1275,6 +1282,7 @@ } } } +#endif UNSAFE_END UNSAFE_ENTRY(void, Unsafe_Unpark(JNIEnv *env, jobject unsafe, jobject jthread))