RFR: 8370682: G1: Survivor regions not in young gen cset group

Thomas Schatzl tschatzl at openjdk.org
Thu Oct 30 11:54:57 UTC 2025


Hi all,

  please review this change to fix the inconsistency of survivor regions having a reference to the young gen cardset group, but the cardset group not containing these regions. That also causes some hack in full gc to remove that link separately during GC.

Basically the fix is to avoid adding the survivor regions to the young gen cardset group during gc (where at the end we would remove that link when resetting the young gen cardset), but only add them at the end after clearing the young gen cardset group. Since we already track survivor regions separately during GC for similar purposes, there is no extra complication with that.

This is made possible by GC not using the young gen cardset during evacuation for determining the need for remembered set tracking, but uses the region attribute table only (apart from some asserts that are now handled separately).

(Fwiw, so to make any newly allocated region start tracking remembered sets, just set that flag in the region attribute table; one can decide at the end of GC what to do with these regions wrt to remembered set maintenance)

Testing: gha, tier1-3

Thanks,
  Thomas

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

Commit messages:
 - 8370682

Changes: https://git.openjdk.org/jdk/pull/28056/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28056&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8370682
  Stats: 42 lines in 4 files changed: 22 ins; 10 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/28056.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28056/head:pull/28056

PR: https://git.openjdk.org/jdk/pull/28056


More information about the hotspot-gc-dev mailing list