JDK-8315061 : Make LockingMode a product flag
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-25
  • Updated: 2023-10-07
  • Resolved: 2023-08-30
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 22
22 b14Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Description
The LockingMode flag from JDK-8291555 was implemented as an
experimental flag. Make it a regular product flag in JDK22 in
preparation for project Lilliput.

In the next release, we plan to change the default of the LockingMode
flag from LM_LEGACY to LM_LIGHTWEIGHT. Project Lilliput needs
the LockingMode flag to be LM_LIGHTWEIGHT. In a release sometime
after the next release, we place to remove support for LM_LEGACY.

Insert additional justification for Lilliput here.

Comments
Changeset: 3eac8905 Author: Daniel D. Daugherty <dcubed@openjdk.org> Date: 2023-08-30 20:20:17 +0000 URL: https://git.openjdk.org/jdk/commit/3eac8905aee6edecbebcc12a41300d3ce176fbff
30-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15496 Date: 2023-08-30 19:36:45 +0000
30-08-2023

In order to change the default LockingMode value from LM_LEGACY to LM_LIGHTWEIGHT, we have to first change LockingMode to a product flag in JDK22 and then in the next release we can change the default LockingMode value from LM_LEGACY to LM_LIGHTWEIGHT. We can't change the default LockingMode value without making LockingMode into a product flag because we have to give customers a supported means of changing the LockingMode should there be any issues with the new default.
30-08-2023

To be honest, I would not make the LockingMode flag a product flag. This has never been my intention. I’d probably change the default to the new lightweight locking, in preparation for Lilliput, but it is not necessary. It would give the new locking some advance exposure, which might be useful.
30-08-2023