JDK-8315275 : Make LockingMode a product flag
  • Type: CSR
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 22
  • Submitted: 2023-08-29
  • Updated: 2023-10-07
  • Resolved: 2023-08-30
Related Reports
CSR :  
Description
Summary
-------

Change experimental flag "LockingMode" to regular product flag.

Problem
-------

The enhancement JDK-8291555 has introduced the experimental option "LockingMode" which improves performance in some scenarios. It is currently not supported in production, so, customers can't benefit from it.

Solution
--------

Make the flag a regular product flag.

Specification
-------------

    -    product(int, LockingMode, LM_LEGACY, EXPERIMENTAL,                         \
    +    product(int, LockingMode, LM_LEGACY,                                       \
                  "Select locking mode: "                                           \
                  "0: monitors only (LM_MONITOR), "                                 \
                  "1: monitors & legacy stack-locking (LM_LEGACY, default), "       \
                  "2: monitors & new lightweight locking (LM_LIGHTWEIGHT)")         \
                  range(0, 2)                                                       \



Comments
Moving to Approved.
30-08-2023

I suspect that when LM_LEGACY is eventually removed, that this would revert to a diagnostic flag to allow use of LM_MONITOR. In the meantime we need a product flag to enable initial production testing, and then transition to LM_LIGHTWEIGHT.
30-08-2023

More details from the Enhancement: 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.
29-08-2023