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

William Kemper wkemper at openjdk.org
Thu Mar 6 17:59:01 UTC 2025


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

>> Xiaolong Peng has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove obsolete code comments
>>  - Address review comments
>
> 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()`.

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

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


More information about the shenandoah-dev mailing list