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

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri Mar 7 01:09:52 UTC 2025


On Fri, 7 Mar 2025 00:31:53 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

>> It is confusing that it looks like a behavior change, but actually there is no behavior change in this method, all the change here is to make the behavior of this method to be exactly same a before. 
>> 
>> The old impl always return the the marking context, regardless the completeness status of marking, because the old `_heap->complete_marking_context()` always return w/o assert error due to inaccurate completeness marking status in the marking context, we are fixing the issue in this PR which breaks the old impl of this method.
>
> The method get_marking_context_for_old is called at line 1363 in method `verify_rem_set_before_mark`, as the name indicates it could be called before mark.
> 
> If current gc generation is global gc, the old marking flag should have set to false when the global flag is set, it is a bit wired I'm not sure if we should change it now, but I think we will have to correct/update the impl of this method later when update the design of completeness flags of global/young/old generations.

Here's my thinking:

The clients of this method do not want to use an incomplete marking context. We either want to look at all the objects (when marking information is incomplete) or we want complete marking context in which case we will skip over dead objects. Hence my reservation about this change.

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

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


More information about the shenandoah-dev mailing list