RFR: 8351091: Shenandoah: global marking context completeness is not accurately maintained [v6]
Xiaolong Peng
xpeng at openjdk.org
Mon Mar 31 18:43:55 UTC 2025
> With the JEP 404: Generational Shenandoah implementation, there are generation specific marking completeness flags introduced, and the global marking context completeness flag is not updated at all after initialization, hence the global marking context completeness is not accurate anymore. This may cause expected behavior: [ShenandoahHeap::complete_marking_context()](https://github.com/openjdk/jdk/pull/23886/files#diff-d5ddf298c36b1c91bf33f9bff7bedcc063074edd68c298817f1fdf39d2ed970fL642) should throw assert error if the global marking context completeness flag is false, but now it always return the marking context even it marking is not complete, this may hide bugs where we expect the global/generational marking to be completed.
>
> This change PR fix the bug in global marking context completeness flag, and update all the places using `ShenandoahHeap::complete_marking_context()` to use proper API.
>
> ### Test
> - [x] hotspot_gc_shenandoah
> - [x] Tier 1
> - [x] Tier 2
Xiaolong Peng has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
- Merge branch 'master' into JDK-8351091
- Address review comments
- 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
- Remove obsolete code comments
- Address review comments
- Always use active_generation()->complete_marking_context() during reference processing
- Revert unnecessary changes in ShenandoahReferenceProcessor
- Revert the change in ShenandoahHeap::generation_for
- ... and 6 more: https://git.openjdk.org/jdk/compare/fe8bd756...c95c0f18
-------------
Changes: https://git.openjdk.org/jdk/pull/23886/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23886&range=05
Stats: 66 lines in 17 files changed: 5 ins; 34 del; 27 mod
Patch: https://git.openjdk.org/jdk/pull/23886.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23886/head:pull/23886
PR: https://git.openjdk.org/jdk/pull/23886
More information about the shenandoah-dev
mailing list