RFR: 8364570: Remove LockingMode related code from riscv64 [v2]
Fei Yang
fyang at openjdk.org
Mon Aug 11 00:17:16 UTC 2025
On Fri, 8 Aug 2025 09:56:45 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 **riscv64** 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.
>
> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
>
> Update one after review
@fbredber : Thanks for the ping. My local tier1-3 test result is good. Looks fine to me modulo several nits.
src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 743:
> 741: const Register tmp3 = c_rarg5;
> 742:
> 743: Label slow_case;
Nit: Maybe declare the two Labels `done` and `slow_case` on the same line.
`Label slow_case, done;`
src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 745:
> 743: Label slow_case;
> 744:
> 745: // Load object pointer into obj_reg c_rarg3
Suggestion: `// Load object pointer into obj_reg (c_rarg3)`
src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 785:
> 783: save_bcp(); // Save in case of exception
> 784:
> 785: // Load oop into obj_reg(c_rarg3)
Suggestion: `// Load oop into obj_reg (c_rarg3)`
src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 791:
> 789: sd(zr, Address(lock_reg, BasicObjectLock::obj_offset()));
> 790:
> 791: Label slow_case;
Similar here. We can declare the two Labels `done` and `slow_case` on the same line.
-------------
Marked as reviewed by fyang (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26658#pullrequestreview-3103526665
PR Review Comment: https://git.openjdk.org/jdk/pull/26658#discussion_r2265176879
PR Review Comment: https://git.openjdk.org/jdk/pull/26658#discussion_r2265178957
PR Review Comment: https://git.openjdk.org/jdk/pull/26658#discussion_r2265179114
PR Review Comment: https://git.openjdk.org/jdk/pull/26658#discussion_r2265178181
More information about the hotspot-runtime-dev
mailing list