RFR: 8370041: GenShen: Filter young pointers from thread local SATB buffers when only marking old [v3]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Thu Nov 6 18:57:08 UTC 2025
On Thu, 6 Nov 2025 17:50:50 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp line 1143:
>>
>>> 1141: // be in the collection set. If this happens, the pointer will be preserved, essentially
>>> 1142: // becoming part of the old snapshot.
>>> 1143: // 2. The region is allocated during evacuation of old. This is also not a concern because
>>
>> One related question. In both these cases, I assume the reference will look "marked" because it's above TAMS for the purposes of the old marking?
>
> In the first case (in-place promotion) the pointer wouldn't necessarily be above TAMS. In this case, we would leave the object in the 'complete' buffer and it would become marked by the old marking threads (it becomes part of the old snapshot).
>
> The second case is not an issue because none of the cset regions will become trash until _after_ `final-update-refs` (so no regions could become old until after we filter the SATB buffers). For regions that are already old, then the TAMS and mark bit map work as usual.
Shouldn't promoted objects look black to the old collection, because that's what SATB marking would want? (In other words, the TAMS for the region should be bottom for that promoted in place region for the purposes of old gen marking.) I'll follow up off-line with you so I understand what's happening here better.
Meanwhile, I'm going to re-approve this PR because I don't want to hold it hostage to my misunderstanding at this time.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27983#discussion_r2500408183
More information about the hotspot-gc-dev
mailing list