diff -r 8d52b4c6f9d8 -r 05aaccf7d558 src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp --- a/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp Mon Apr 29 14:34:10 2019 -0400 +++ b/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp Mon Apr 29 16:01:52 2019 -0400 @@ -110,14 +110,14 @@ void JfrPostBox::synchronous_post(int msg) { assert(is_synchronous(msg), "invariant"); assert(!JfrMsg_lock->owned_by_self(), "should not hold JfrMsg_lock here!"); - MutexLocker msg_lock(JfrMsg_lock); + MonitorLocker msg_lock(JfrMsg_lock); deposit(msg); // serial_id is used to check when what we send in has been processed. // _msg_read_serial is read under JfrMsg_lock protection. const uintptr_t serial_id = OrderAccess::load_acquire(&_msg_read_serial) + 1; - JfrMsg_lock->notify_all(); + msg_lock.notify_all(); while (!is_message_processed(serial_id)) { - JfrMsg_lock->wait(); + msg_lock.wait(); } }