RFR: 8275527: Separate/refactor forward pointer access [v4]

Roman Kennke rkennke at openjdk.java.net
Thu Oct 28 12:41:14 UTC 2021


On Thu, 21 Oct 2021 07:30:44 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move forward impl into markWord and add assert
>
> src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp line 112:
> 
>> 110:       // since it will be restored by preserved marks.
>> 111:       object->init_mark();
>> 112:     } else {
> 
> Could you explain why this was removed?

The G1 Full GC code decoded the fwdptr without checking if object is actually forwarded (i.e. by checking the lowest two mark word bits), and then compare the result with NULL. In order for this to work, it modifies the mark word of not forwarded objects to prototype mark. This is all quite messy and can be avoided by checking is_forwarded() before actually decoding the fwdptr.

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

PR: https://git.openjdk.java.net/jdk/pull/5955



More information about the hotspot-gc-dev mailing list