RFR: 8375626: G1: Convert G1CollectionSetChooser to use Atomic<T>

Kim Barrett kbarrett at openjdk.org
Mon Jan 19 19:10:34 UTC 2026


On Mon, 19 Jan 2026 11:56:19 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this change to use `Atomic<T>` for the `G1CollectionSetChooser` class.
> 
> Testing: gha
> 
> Thanks,
>   Thomas

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp line 31:

> 29: #include "gc/shared/gc_globals.hpp"
> 30: #include "memory/allStatic.hpp"
> 31: #include "runtime/atomic.hpp"

atomic isn't used in the header, only the the .cpp.  Add to the latter instead.
That makes this file unmodified, so no need to update copyright either.

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

PR Review: https://git.openjdk.org/jdk/pull/29298#pullrequestreview-3679299325
PR Review Comment: https://git.openjdk.org/jdk/pull/29298#discussion_r2705832473


More information about the hotspot-gc-dev mailing list