RFR: 8351091: Shenandoah: global marking context completeness is not accurately maintained [v4]
Xiaolong Peng
xpeng at openjdk.org
Thu Mar 6 23:54:54 UTC 2025
On Thu, 6 Mar 2025 21:26:22 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Remove ShenandoahHeap::complete_marking_context(ShenandoahHeapRegion* region)
>> - Revert "complete_marking_context should guarantee mark is complete"
>>
>> This reverts commit 2004973965ea0e617cf9e5fc45be24f0e06e90a1.
>> - complete_marking_context should guarantee mark is complete
>
> src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp line 1:
>
>> 1: /*
>
> This all looks good.
> One thing to think about in general about assertions in closures is whether instead of making use of knowledge of the context in which these closures are used, whether it may produce more mantianable code to embed the "active_generation" to which the closure is being applied in the closure itself and have the assertions (or other uses of context) use that instead. Nothing to be done now, but something to think about in making more maintainable code.
Right, active_generation should be used instead of global_generation to get the complete marking context, with the context of full GC, even we know it active_generation is the global gen, but it's better not to use global_generation directly for better maintainable code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23886#discussion_r1984201726
More information about the shenandoah-dev
mailing list