JDK-8334299 : Deprecate LockingMode option, along with LM_LEGACY and LM_MONITOR
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-06-14
  • Updated: 2024-07-12
  • Resolved: 2024-06-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b04Fixed
Related Reports
CSR :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8331076 :  
Description
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.
Comments
Changeset: 5ac2149b Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2024-06-24 12:37:53 +0000 URL: https://git.openjdk.org/jdk/commit/5ac2149b7bde947886533bf5996d977bb8ec66f1
24-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19827 Date: 2024-06-21 13:19:12 +0000
21-06-2024