RFR: 8338995: New Object to ObjectMonitor mapping: PPC64 implementation [v3]

Martin Doerr mdoerr at openjdk.org
Wed Sep 18 14:05:07 UTC 2024


On Wed, 18 Sep 2024 13:17:26 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> Is `monitor` initialized as needed if `!UseObjectMonitorTable`? I can't see it.
>
> Yes, I think so. Note that `mark` and `monitor` are the same register. The difference is that the ObjectMonitor pointer in the mark word is tagged. This needs to be compensate for in the offset (L2876 in my suggestion). It might be better to use `monitor` also at L2814 and add a comment at the declaration of `monitor` that the pointer is tagged with `!UseObjectMonitorTable`.

The idea is good. Unfortunately, it doesn't work because ld/std instructions can't add/subtract small offsets: https://github.com/openjdk/jdk/blob/471a51a5a4395f0bc6818c3c1d30455ce75500d6/src/hotspot/cpu/ppc/assembler_ppc.hpp#L1144
assert((x & 0x3) == 0) failed: unaligned offset

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20922#discussion_r1765122989


More information about the hotspot-dev mailing list