8079359: disable JDK-8061553 optimization while JDK-8077392 is resolved
Summary: Borrow an unused SyncFlags value to disable the "fast enter" optimization.
Reviewed-by: lana, dsamersoff, amurillo
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp Sat May 02 00:16:29 2015 -0700
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp Tue May 05 18:57:57 2015 -0700
@@ -1793,7 +1793,9 @@
// Handles the uncommon case in locking, i.e., contention or an inflated lock.
JRT_BLOCK_ENTRY(void, SharedRuntime::complete_monitor_locking_C(oopDesc* _obj, BasicLock* lock, JavaThread* thread))
- if (!SafepointSynchronize::is_synchronizing()) {
+ // Disable ObjectSynchronizer::quick_enter() in default config
+ // until JDK-8077392 is resolved.
+ if ((SyncFlags & 256) != 0 && !SafepointSynchronize::is_synchronizing()) {
// Only try quick_enter() if we're not trying to reach a safepoint
// so that the calling thread reaches the safepoint more quickly.
if (ObjectSynchronizer::quick_enter(_obj, thread, lock)) return;