RFR: 8359437: Make users and test suite not able to set LockingMode flag

Leonid Mesnik lmesnik at openjdk.org
Mon Jun 23 17:09:32 UTC 2025


On Tue, 17 Jun 2025 08:39:49 GMT, Anton Artemov <duke at openjdk.org> wrote:

> This PR contains changes for the 1st phase of the `LockingMode` flag obsoletion. 
> 
> The work is done by @fbredber, I have taken it over and am finishing it while he's on vacation. 
> 
> In the 1st phase one keeps the `LockingMode` variable in all places, but makes it non-settable from the command line. All the C1 and C2 code related to legacy locking will still be in place (but as dead code) and removed later (phase 2).
> 
> Lightweight locking is the default locking from now on.
> 
> Tested in tiers 1 - 7.

Marked as reviewed by lmesnik (Reviewer).

Sorry, I mistakenly approved the fix instead fo request changes. Please find my change requests in previous comments.

test/hotspot/jtreg/gtest/LockStackGtests.java line 26:

> 24: 
> 25: /* @test
> 26:  * @summary Run LockStack gtests with LockingMode=2

All gtests are executed with default vm flags in GTestWrapper.java so this while test should be just removed.

test/hotspot/jtreg/runtime/Monitor/ConcurrentDeflation.java line 37:

> 35:  * @bug 8318757
> 36:  * @summary Test concurrent monitor deflation by MonitorDeflationThread and thread dumping
> 37:  * @library /test/lib /

The '/' shouldn't be required for whitebox. Could you please remove it.

-------------

PR Review: https://git.openjdk.org/jdk/pull/25847#pullrequestreview-2950786910
Changes requested by lmesnik (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25847#pullrequestreview-2950827379
PR Review Comment: https://git.openjdk.org/jdk/pull/25847#discussion_r2162077784
PR Review Comment: https://git.openjdk.org/jdk/pull/25847#discussion_r2162055605


More information about the serviceability-dev mailing list