RFR: 8342848: Shenandoah: Marking bitmap may not be completely cleared in generational mode [v4]

Xiaolong Peng xpeng at openjdk.org
Wed Oct 23 20:28:34 UTC 2024


On Wed, 23 Oct 2024 18:51:42 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

>> Hmm, you reckon the affiliation is changing between first testing for `_generation->contains` and then testing for `!region->is_affiliated()`? I suppose this _could_ happen, but the fix feels fragile (not sure we can guarantee the compiler won't reorder the tests). We do have `ShenandoahHeapRegion::affiliation`. What about:
>> 
>>   auto affiliation = region->affiliation();
>>   bool needs_reset = (affiliation == ShenandoahAffiliation::FREE || _generation->contains(affiliation))
>> 
>> Where `ShenandoahGeneration::contains(ShenandoaAffiliation affiliation)` tests if the affiliation and the generation type match?
>
> I didn't notice we have `ShenandoahGeneration::contains(ShenandoaAffiliation affiliation) `, I'll update the PR, thanks.

I have added `ShenandoahGeneration::contains(ShenandoaAffiliation affiliation)` and updated the PR.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/523#discussion_r1813484827


More information about the shenandoah-dev mailing list