RFR: 8305896: Alternative full GC forwarding [v16]

Roman Kennke rkennke at openjdk.org
Tue May 2 17:46:37 UTC 2023


On Tue, 2 May 2023 15:11:59 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address @shipilev's review
>
> src/hotspot/share/gc/shared/slidingForwarding.cpp line 137:
> 
>> 135: void FallbackTable::forward_to(HeapWord* from, HeapWord* to) {
>> 136:   size_t idx = home_index(from);
>> 137:   if (_table[idx]._from != nullptr) {
> 
> Here you need to do a contains check, right? Because, as you wrote in your answer to Aleksey, forwardings can be rewritten: https://github.com/openjdk/jdk/pull/13582/files#r1180126262

I don't think that ever happens (I think we'd only ever re-forward from normal forwarding to fallback-forwarding once), but I am adding that check for extra sanity.

> test/hotspot/gtest/gc/shared/test_slidingForwarding.cpp line 40:
> 
>> 38:   return ((uintptr_t(1) << 2) /* fallback */ | 3 /* forwarded */);
>> 39: }
>> 40: 
> 
> Could you add a test that forwarding works for displaced Oop+OM ?

Uhhh, that would involved the OM and preserved-marks subsystems. The saving and restoring of 'interesting mark-words' is done outside of the GCForwarding subsystem and not the responsibility here. I'd rather not test for that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13582#discussion_r1182855383
PR Review Comment: https://git.openjdk.org/jdk/pull/13582#discussion_r1182856956


More information about the hotspot-gc-dev mailing list