RFR: Enable remembered set verification during global collections
William Kemper
wkemper at openjdk.java.net
Wed Sep 8 22:15:23 UTC 2021
On Wed, 8 Sep 2021 21:02:33 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2657:
>>
>>> 2655: HeapWord* tams = ctx->top_at_mark_start(r);
>>> 2656: if (obj_addr >= tams) {
>>> 2657: obj_addr += obj->size();
>>
>> Were you actually seeing obj_addr >= tams here? I'd be inclined to replace your new code with an assert(obj_addr < tams). Or provide comments to explain.
>
> If we verify remset while old marking is "ongoing", ctx is not "reliable". In that case, I had been arranging for ctx to equal NULL with the understanding that obj->size() would get me to the next (possibly coalesced and filled) object within old-gen. I don't yet follow the logic for how you can always rely on ctx being not NULL here.
If `ctx` is NULL, we'll have gone into the other path and used `obj->size()` to advance `obj_addr`. I'll add an assert that `obj_addr` is below TAMS during the init-mark verification. We only verify the remembered set during a mixed evacuation or global collect (as of this change). In both cases there should be no concurrent marking of old (I'll add an assert for this also).
-------------
PR: https://git.openjdk.java.net/shenandoah/pull/64
More information about the shenandoah-dev
mailing list