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

Roman Kennke rkennke at openjdk.org
Thu Feb 15 11:04:06 UTC 2024


On Thu, 15 Feb 2024 10:41:23 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More consistent use of markWord::is_forwarded()
>
> test/hotspot/gtest/gc/shared/test_preservedMarks.cpp line 35:
> 
>> 33:   // could be interpreted as 'self-forwarded' when encoded as
>> 34:   // forwardee in the mark-word.
>> 35:   alignas(BytesPerLong) oopDesc _oop;
> 
> Could you explain why this is required? (I'd expect `oopDesc` to be properly aligned already, since it's >= 8 bytes.)

This is a problem with x86_32 builds, where oopDesc is only 4 byte. It is only a problem in this test, in real world, objects in the heap are always at least 8-byte-aligned.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17755#discussion_r1490827573


More information about the hotspot-gc-dev mailing list