RFR: 8364141: Remove LockingMode related code from x86 [v3]

David Holmes dholmes at openjdk.org
Wed Aug 6 05:46:06 UTC 2025


On Tue, 5 Aug 2025 12:36:00 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

>> Since the integration of [JDK-8359437](https://bugs.openjdk.org/browse/JDK-8359437) the `LockingMode` flag can no longer be set by the user, instead it's declared as `const int LockingMode = LM_LIGHTWEIGHT;`. This means that we can now safely remove all `LockingMode` related code from all platforms.
>> 
>> This PR removes `LockingMode` related code from the **x86** platform.
>> 
>> When all the `LockingMode` code has been removed from all platforms, we can go on and remove it from shared (non-platform specific) files as well. And finally remove the `LockingMode` variable itself.
>> 
>> Passes tier1-tier5 with no added problems.
>
> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update two after review

Marked as reviewed by dholmes (Reviewer).

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 409:

> 407: //
> 408: // The only other source of unbalanced locking would be JNI.  The "Java Native Interface
> 409: // Specification" states that an object locked by JNI's_MonitorEnter should not be

Suggestion:

// Specification" states that an object locked by JNI's MonitorEnter should not be

Sorry missed the misplaced underscore due to the red-wavy-line spelling error

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

PR Review: https://git.openjdk.org/jdk/pull/26552#pullrequestreview-3090489187
PR Review Comment: https://git.openjdk.org/jdk/pull/26552#discussion_r2255920037


More information about the hotspot-compiler-dev mailing list