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

David Holmes dholmes at openjdk.org
Tue Jun 24 09:18:16 UTC 2025


On Tue, 24 Jun 2025 09:14:42 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.
>
> Anton Artemov has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - 8359437: Addressed reviewers' comments
>  - 8359437: Addressed reviewers' comments

Changes requested by dholmes (Reviewer).

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

> 78:             monitors[index] = new Object();
> 79:             synchronized (monitors[index]) {
> 80:                 WB.forceInflateMonitorLockedObject(monitors[index]);

This is now the only use of the new WB method and we can replace this with a simple:

monitors[index].wait(1);

as the `wait` forces inflation. Then we can deleted the new WB stuff.

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

PR Review: https://git.openjdk.org/jdk/pull/25847#pullrequestreview-2952909815
PR Review Comment: https://git.openjdk.org/jdk/pull/25847#discussion_r2163410222


More information about the hotspot-dev mailing list