--- old/src/hotspot/share/runtime/safepoint.cpp 2019-04-18 22:07:25.364306975 -0400 +++ new/src/hotspot/share/runtime/safepoint.cpp 2019-04-18 22:07:24.620306988 -0400 @@ -525,6 +525,10 @@ _counters(counters) {} void do_thread(Thread* thread) { + // deflate_thread_local_monitors() handles or requests deflation of + // this thread's idle monitors. If !AsyncDeflateIdleMonitors or if + // there is a special cleanup request, deflation is handled now. + // Otherwise, async deflation is requested via a flag. ObjectSynchronizer::deflate_thread_local_monitors(thread, _counters); if (_nmethod_cl != NULL && thread->is_Java_thread() && ! thread->is_Code_cache_sweeper_thread()) { @@ -561,7 +565,7 @@ // when a special cleanup has been requested. // Note: This logging output will include global idle monitor // elapsed times, but not global idle monitor deflation count. - ObjectSynchronizer::do_safepoint_work(!AsyncDeflateIdleMonitors ? _counters : NULL); + ObjectSynchronizer::do_safepoint_work(_counters); post_safepoint_cleanup_task_event(event, safepoint_id, name); }