--- old/src/hotspot/share/runtime/arguments.cpp 2018-09-07 13:38:42.359077108 -0700 +++ new/src/hotspot/share/runtime/arguments.cpp 2018-09-07 13:38:42.151077115 -0700 @@ -575,6 +575,7 @@ { "TransmitErrorReport", JDK_Version::undefined(), JDK_Version::jdk(12), JDK_Version::jdk(13) }, { "ErrorReportServer", JDK_Version::undefined(), JDK_Version::jdk(12), JDK_Version::jdk(13) }, { "EmitSync", JDK_Version::undefined(), JDK_Version::jdk(12), JDK_Version::jdk(13) }, + { "SyncFlags", JDK_Version::undefined(), JDK_Version::jdk(12), JDK_Version::jdk(13) }, #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS { "dep > obs", JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() }, --- old/src/hotspot/share/runtime/globals.hpp 2018-09-07 13:38:43.295077075 -0700 +++ new/src/hotspot/share/runtime/globals.hpp 2018-09-07 13:38:43.031077085 -0700 @@ -841,9 +841,6 @@ "The check is performed on GuaranteedSafepointInterval.") \ range(0, 100) \ \ - experimental(intx, SyncFlags, 0, "(Unsafe, Unstable) " \ - "Experimental Sync flags") \ - \ experimental(intx, SyncVerbose, 0, "(Unstable)") \ \ experimental(intx, hashCode, 5, \ --- old/src/hotspot/share/runtime/objectMonitor.cpp 2018-09-07 13:38:44.279077041 -0700 +++ new/src/hotspot/share/runtime/objectMonitor.cpp 2018-09-07 13:38:44.023077050 -0700 @@ -529,7 +529,7 @@ // timer scalability issues we see on some platforms as we'd only have one thread // -- the checker -- parked on a timer. - if ((SyncFlags & 16) == 0 && nxt == NULL && _EntryList == NULL) { + if (nxt == NULL && _EntryList == NULL) { // Try to assume the role of responsible thread for the monitor. // CONSIDER: ST vs CAS vs { if (Responsible==null) Responsible=Self } Atomic::replace_if_null(Self, &_Responsible); @@ -555,12 +555,8 @@ if (TryLock(Self) > 0) break; assert(_owner != Self, "invariant"); - if ((SyncFlags & 2) && _Responsible == NULL) { - Atomic::replace_if_null(Self, &_Responsible); - } - // park self - if (_Responsible == Self || (SyncFlags & 1)) { + if (_Responsible == Self) { TEVENT(Inflated enter - park TIMED); Self->_ParkEvent->park((jlong) recheckInterval); // Increase the recheckInterval, but clamp the value. @@ -675,9 +671,6 @@ // monitorexit. Recall too, that in 1-0 mode monitorexit does not necessarily // execute a serializing instruction. - if (SyncFlags & 8) { - OrderAccess::fence(); - } return; } @@ -719,11 +712,7 @@ // cleared by handle_special_suspend_equivalent_condition() // or java_suspend_self() jt->set_suspend_equivalent(); - if (SyncFlags & 1) { - Self->_ParkEvent->park((jlong)MAX_RECHECK_INTERVAL); - } else { - Self->_ParkEvent->park(); - } + Self->_ParkEvent->park(); // were we externally suspended while we were waiting? for (;;) { @@ -937,9 +926,7 @@ // Invariant: after setting Responsible=null an thread must execute // a MEMBAR or other serializing instruction before fetching EntryList|cxq. - if ((SyncFlags & 4) == 0) { - _Responsible = NULL; - } + _Responsible = NULL; #if INCLUDE_JFR // get the owner's thread id for the MonitorEnter event @@ -1474,9 +1461,8 @@ AddWaiter(&node); Thread::SpinRelease(&_WaitSetLock); - if ((SyncFlags & 4) == 0) { - _Responsible = NULL; - } + _Responsible = NULL; + intptr_t save = _recursions; // record the old recursion count _waiters++; // increment the number of waiters _recursions = 0; // set the recursion level to be 1 @@ -1622,10 +1608,6 @@ assert(_succ != Self, "invariant"); assert(((oop)(object()))->mark() == markOopDesc::encode(this), "invariant"); - if (SyncFlags & 32) { - OrderAccess::fence(); - } - // check if the notification happened if (!WasNotified) { // no, it could be timeout or Thread.interrupt() or both @@ -1759,9 +1741,7 @@ // Note: We can also detect many such problems with a "minimum wait". // When the "minimum wait" is set to a small non-zero timeout value // and the program does not hang whereas it did absent "minimum wait", -// that suggests a lost wakeup bug. The '-XX:SyncFlags=1' option uses -// a "minimum wait" for all park() operations; see the recheckInterval -// variable and MAX_RECHECK_INTERVAL. +// that suggests a lost wakeup bug. void ObjectMonitor::notify(TRAPS) { CHECK_OWNER();