RFR: 8375981: G1: Convert G1RemSet helper classes to use Atomic<T>
Aleksey Shipilev
shade at openjdk.org
Thu Jan 22 09:26:09 UTC 2026
On Wed, 21 Jan 2026 12:31:34 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this conversion of `G1RemSet` helper classes to use `Atomic<>`.
>
> There has been one additional non-volatile member that has been converted to use `Atomic<T>`.
>
> Testing: gha, tier1
>
> Thanks,
> Thomas
src/hotspot/share/gc/g1/g1RemSet.cpp line 234:
> 232: // either.
> 233: }
> 234: cur = next;
Wait a second, is it really the same? `next` is from fetch-then-add, so it is "old" value? Original code re-reads `_cur_dirty_regions`, which looks more like "new" value after fetch-then-add?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29345#discussion_r2716035412
More information about the hotspot-gc-dev
mailing list