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

Thomas Schatzl tschatzl at openjdk.org
Thu Jul 31 13:35:20 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

Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:

  * fix sort function

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26572/files
  - new: https://git.openjdk.org/jdk/pull/26572/files/213e156b..c254b942

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26572&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26572&range=00-01

  Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 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