RFR: 8375436: G1: Convert G1CardSet classes to use Atomic<T>
Kim Barrett
kbarrett at openjdk.org
Tue Jan 20 04:45:11 UTC 2026
On Fri, 16 Jan 2026 09:31:59 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this removal of use of the AtomicAccess class in G1 card set related classes, replacing with use of Atomic<T>.
>
> Although a bit on the large side, it would be hard to do the card set changes separately per class. Other than that I think it is fairly straightforward, except for the addition of a copy constructor for `G1CardSetHashTableValue` because the `ConcurrentHashTable` requires it.
>
> Testing: gha
>
> Thanks,
> Thomas
Looks good, but for one trivial whitespace issue.
src/hotspot/share/gc/g1/g1CardSet.hpp line 158:
> 156: private:
> 157: // Indices are "from" indices.
> 158: Atomic<size_t>_coarsen_from[NumCoarsenCategories];
Missing space between type an variable.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29274#pullrequestreview-3680310484
PR Review Comment: https://git.openjdk.org/jdk/pull/29274#discussion_r2706721901
More information about the hotspot-gc-dev
mailing list