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

Thomas Schatzl tschatzl at openjdk.org
Thu Aug 21 09:39:10 UTC 2025


On Thu, 31 Jul 2025 10:49:39 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: f0e70669
Author:    Thomas Schatzl <tschatzl at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f0e706698df5ac199198b252d77d27a05abad1da
Stats:     95 lines in 4 files changed: 29 ins; 38 del; 28 mod

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

Reviewed-by: ayang, iwalulya

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

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


More information about the hotspot-gc-dev mailing list