RFR: 8365055: G1: Merge Heap Roots phase incorrectly clears young gen remembered set every time
Thomas Schatzl
tschatzl at openjdk.org
Fri Aug 8 13:01:24 UTC 2025
Hi all,
please review this fix to G1 heap root merging that cleared the young gen remembered set multiple times (for every merging) and overwriting the most recent statistics for the number of young gen cards.
The latter is probably the more problematic, as it directly impacts young gen sizing statistics, potentially making young gen too large.
The fix is to move the two statements to the proper place - get current number of young gen cards at startup, clear the young gen remset when starting a new collection set - we do not need to do that earlier after all. Additionally we can add some (superfluous?) verification that during GC we really do not add to the young gen remset.
Testing: tier1-5
Thanks,
Thomas
-------------
Commit messages:
- 8365055
Changes: https://git.openjdk.org/jdk/pull/26695/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26695&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8365055
Stats: 33 lines in 5 files changed: 17 ins; 11 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/26695.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26695/head:pull/26695
PR: https://git.openjdk.org/jdk/pull/26695
More information about the hotspot-gc-dev
mailing list