RFR: 8319901: Recursive lightweight locking: ppc64le implementation
Richard Reingruber
rrich at openjdk.org
Fri Mar 1 17:35:55 UTC 2024
On Fri, 10 Nov 2023 13:21:58 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> Draft implementation of recursive lightweight JDK-8319796 for ppc64le.
>
> Porters feel free to discard this and implement something from scratch, take this initial draft and run with it, or send patches to me and if you want me to drive the PR.
>
> Some notes:
> ppc64le deviates from the other ports, it shares it C2 locking code with the native call wrapper. This draft unifies the behavior across the ports by using the C1/interpreter locking for native call wrapper. If it is important to have a fast path for the inflated monitor case for native call wrapper, it could be done without having it share its implementation with C2.
> It would also be possible to change this behavior on all ports (share the C2 code), as I believe the C2 assumptions always hold for the native call wrapper, the monitor exit and monitor enter will be balanced and structured.
This looks good to me.
(just found a bunch of typos you might want to fix)
Thanks, Richard.
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2474:
> 2472:
> 2473: #ifdef ASSERT
> 2474: // Check that locked label is reached with flags == EQ.
Suggestion:
// Check that locked label is reached with flag == EQ.
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2481:
> 2479: bind(slow_path);
> 2480: #ifdef ASSERT
> 2481: // Check that slow_path label is reached with flags == NE.
Suggestion:
// Check that slow_path label is reached with flag == NE.
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2630:
> 2628:
> 2629: #ifdef ASSERT
> 2630: // Check that unlocked label is reached with flags == EQ.
Suggestion:
// Check that unlocked label is reached with flag == EQ.
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2637:
> 2635: bind(slow_path);
> 2636: #ifdef ASSERT
> 2637: // Check that slow_path label is reached with flags == NE.
Suggestion:
// Check that slow_path label is reached with flag == NE.
-------------
Marked as reviewed by rrich (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16611#pullrequestreview-1911152553
PR Review Comment: https://git.openjdk.org/jdk/pull/16611#discussion_r1508996979
PR Review Comment: https://git.openjdk.org/jdk/pull/16611#discussion_r1508999295
PR Review Comment: https://git.openjdk.org/jdk/pull/16611#discussion_r1509261672
PR Review Comment: https://git.openjdk.org/jdk/pull/16611#discussion_r1509261987
More information about the hotspot-dev
mailing list