Integrated: 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic<T>
Thomas Schatzl
tschatzl at openjdk.org
Mon Feb 2 17:00:16 UTC 2026
On Thu, 22 Jan 2026 16:36:08 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please convert remaining volatile declarations in `G1ConcurrentMark` to use `Atomic<T>`. These volatiles are used to indicate concurrent phased access (like changing the variable in thread A, then reading the variable in thread B while A is dormant, or only ever updating it in one direction) where concurrency safety is provided by barriers between these phases. But there are also other cases)
>
> The exception is `G1ConcurrentMark::_finger` that has apparently been overlooked in an earlier changes.
>
> Testing: gha
>
> Thanks,
> Thomas
This pull request has now been integrated.
Changeset: b6024988
Author: Thomas Schatzl <tschatzl at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b60249882cc511a7fc9cf9ae11e8beb1602ea10f
Stats: 64 lines in 4 files changed: 10 ins; 0 del; 54 mod
8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic<T>
Reviewed-by: iwalulya, kbarrett, stefank
-------------
PR: https://git.openjdk.org/jdk/pull/29368
More information about the hotspot-gc-dev
mailing list