RFR: 8351091: Shenandoah: global marking context completeness is not accurately maintained [v3]

Xiaolong Peng xpeng at openjdk.org
Thu Mar 6 18:30:00 UTC 2025


On Thu, 6 Mar 2025 17:56:31 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp line 172:
>> 
>>> 170: // contained herein.
>>> 171: void ShenandoahGenerationalEvacuationTask::promote_in_place(ShenandoahHeapRegion* region) {
>>> 172:   ShenandoahMarkingContext* const marking_context = _heap->complete_marking_context(region);
>> 
>> We shouldn't need to look up the generation for this region. It's being promoted so it must be young (in fact, this asserted a few lines down). Perhaps:
>> 
>> assert(_heap->young_generation()->is_mark_completed(), "Cannot promote without complete marking for young");
>> ShenandoahMarkingContext* const marking_context = _heap->marking_context();
>
> or `_heap->young_generation()->complete_marking_context()`.

I think `_heap->young_generation()->complete_marking_context()` is better here, I'll update it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23886#discussion_r1983859657


More information about the shenandoah-dev mailing list