RFR: 8305898: Alternative self-forwarding mechanism [v19]

Roman Kennke rkennke at openjdk.org
Fri Aug 25 19:35:11 UTC 2023


On Fri, 25 Aug 2023 19:13:22 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> The main reason why we need to implement the self-forwarding is to preserve the upper bits of the mark-word (specifically, the Klass* that we want to place there with JEP 450). If the header is displaced, we would install the self-forwarded bit in the tagged native-pointer that is in the header, meaning we loose the ability to get to the actual header to fetch the Klass*. We do restore the header later, but GC needs access to the Klass* meanwhile.
>
> Thanks. While reviewing this patch I was thinking about the current JDK code, which as far as I understand doesn't need to restore the displaced header here.

Right. It might be cleaner to move that part out of here and into #13961, WDYT?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13779#discussion_r1306078203


More information about the hotspot-gc-dev mailing list