RFR: 8373116: Genshen: arraycopy_work should be always done for arrays in old gen during young concurrent marking [v7]
Kelvin Nilsen
kdnilsen at openjdk.org
Mon Dec 8 20:56:01 UTC 2025
On Mon, 8 Dec 2025 20:45:36 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Also test is_generational
>
> src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 450:
>
>> 448: assert(_heap->is_concurrent_mark_in_progress(), "only during marking");
>> 449: if (ShenandoahSATBBarrier) {
>> 450: if (!_heap->marking_context()->allocated_after_mark_start(reinterpret_cast<HeapWord*>(dst)) ||
>
> Predicates:
> A: heap->is_concurrent_young_mark_in_progress()
> B: heap->is_concurrent_old_mark_in_progress()
> C: heap->heap_region_containining(dst)->is_old()
> D: !heap->marking_context()->allocated_after_mark_start(dst)
>
> I think the conditions under which we need to call arraycopy_work() are:
> (A && C) || (A && D) || (B && C && D)
> which could be written:
> (A && (C || D)) || (B && C && D)
>
> As written, I think we are also calling arraycopy_work() under certain unnecessary conditions, such as:
> (B && C)
Wondering if the test for is_generational() could be captured in a template parameter. Each invocation that I find with grep already knows whether is_generational.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28669#discussion_r2600093807
More information about the shenandoah-dev
mailing list