Having selection of locking modes for a user to pick in order to choose how HotSpot internally implements object synchronization is not something we should provide. This flag was introduced in JDK 21 so should not be in widespread use.
HotSpot has recently changed the internal implementation of LockingMode to LM_LIGHTWEIGHT from LM_LEGACY. LM_LEGACY is an internal locking mode that is incompatible with newer changes to HotSpot, like Compact Object Headers: JDK-8294992.
This RFE also is to deprecate LM_LEGACY and LM_MONITOR LockingMode selections, and reintroduce (revert) the UseHeavyMonitors option as a develop flag, rather than a diagnostic flag. If the performance of this is too bad in production, it's not really a good workaround option that we can give to a customer. And it's too slow to regularly test, and not well tested to date.
Needs CSR.
HotSpot has recently changed the internal implementation of LockingMode to LM_LIGHTWEIGHT from LM_LEGACY. LM_LEGACY is an internal locking mode that is incompatible with newer changes to HotSpot, like Compact Object Headers: JDK-8294992.
This RFE also is to deprecate LM_LEGACY and LM_MONITOR LockingMode selections, and reintroduce (revert) the UseHeavyMonitors option as a develop flag, rather than a diagnostic flag. If the performance of this is too bad in production, it's not really a good workaround option that we can give to a customer. And it's too slow to regularly test, and not well tested to date.
Needs CSR.
- csr for
-
JDK-8334496 Deprecate LockingMode option, along with LM_LEGACY and LM_MONITOR
- Closed
- duplicates
-
JDK-8331073 Deprecate LockingMode=LM_LEGACY
- Closed
- relates to
-
JDK-8336325 Add back UseHeavyMonitors as a develop option
- Open
-
JDK-8344261 Obsolete the LockingMode flag and related code
- Open
-
JDK-8305999 Add experimental -XX:LockingMode flag
- Closed
-
JDK-8315881 Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT
- Closed
-
JDK-8294992 JEP 450: Compact Object Headers (Experimental)
- Completed
(2 relates to, 2 links to)