RFR: 8364414: G1: Use simpler data structure for holding collection set candidates during calculation

Thomas Schatzl tschatzl at openjdk.org
Thu Jul 31 10:55:38 UTC 2025


Hi all,

  please review this refactoring of the collection set choosing mechanism to use a lighter data structure: instead of an array of `G1CollectionSetCandidateInfo`s, use an array of `G1HeapRegion*` - we do not use the additional information provided by `G1CollectionSetCandidateInfo' at all during that process, and we copy the contents later anyway.

This reduces code complexity a bit (no need to extract the `G1HeapRegion*` from the struct) and reduces memory consumption a little as well.

Testing: gha

Thanks,
  Thomas

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

Commit messages:
 - 8364414

Changes: https://git.openjdk.org/jdk/pull/26572/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26572&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8364414
  Stats: 93 lines in 4 files changed: 27 ins; 38 del; 28 mod
  Patch: https://git.openjdk.org/jdk/pull/26572.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26572/head:pull/26572

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


More information about the hotspot-gc-dev mailing list