RFR: 8305898: Alternative self-forwarding mechanism
Stefan Karlsson
stefank at openjdk.org
Thu Aug 22 09:27:04 UTC 2024
On Thu, 22 Aug 2024 09:20:30 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>>> Otherwise we'd have to preserve/restore them.
>>
>> OK, then it's incorrect to use `init_mark()` for self-fwd objs.
>>
>> This method is for self-fwd objs only. Can we remove the `else if` part? The non-self-fwd objs are essentially dead, right?
>
> I wasn't sure about this. What happens to successfully-promoted objects? Are we sure that no references point to their from-space parts? If yes, then I'd remove the else-if part and place an assert there instead.
The else if part is needed when we later turn on UseCompactObjectHeaders, because the "normal" forwarding pointers then destroy the klass pointers, causing the object_iterate to fail to read the size of the objects.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20603#discussion_r1726689537
More information about the hotspot-gc-dev
mailing list