RFR: 8316746: Top of lock-stack does not match the unlocked object [v3]

Richard Reingruber rrich at openjdk.org
Thu Nov 2 15:39:03 UTC 2023


On Sun, 29 Oct 2023 17:46:55 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> It took me quite a long journey to figure out that C2 OSR goes wrong only in the test "vmTestbase/nsk/jdi/StepEvent" because the interpreter fills the slots in a different order as expected by C2. (Interpreter and C1 don't care about it.)
>> I've reimplemented the search loop in `monitorenter`, improved comments and cleaned up the related code a bit. The test is passing with this change.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add regression test.

Hi Martin,

the order of [`BasicObjectLocks` in the interpreter is specified](https://github.com/openjdk/jdk/blob/7a7b1e5a920d71ab717d8993c9258a01f1074a48/src/hotspot/share/runtime/frame.hpp#L368-L375) if the locking operations are well-formed.

the comment on the PPC implementation of [`frame::interpreter_frame_monitor_end`](https://github.com/openjdk/jdk/blob/7a7b1e5a920d71ab717d8993c9258a01f1074a48/src/hotspot/cpu/ppc/frame_ppc.cpp#L457-L458) is wrong. It should be removed.

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

PR Review: https://git.openjdk.org/jdk/pull/16406#pullrequestreview-1710620406


More information about the hotspot-compiler-dev mailing list