diff -r 9c0aa7bc3fe3 -r d20828de9e39 hotspot/src/share/vm/runtime/safepoint.cpp --- a/hotspot/src/share/vm/runtime/safepoint.cpp Wed Jun 14 08:47:27 2017 +0200 +++ b/hotspot/src/share/vm/runtime/safepoint.cpp Thu Jun 15 09:52:44 2017 +0200 @@ -525,6 +525,8 @@ } bool SafepointSynchronize::is_cleanup_needed() { + // Need a safepoint if there are many monitors to deflate. + if (ObjectSynchronizer::is_cleanup_needed()) return true; // Need a safepoint if some inline cache buffers is non-empty if (!InlineCacheBuffer::is_empty()) return true; return false;