RFR: 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic<T> [v3]
Thomas Schatzl
tschatzl at openjdk.org
Wed Jan 28 11:35:51 UTC 2026
> 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
Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
* separate initialization and reset for _top_at_rebuild_starts
* add initialization for _top_at_mark_starts, _region_mark_stats
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29368/files
- new: https://git.openjdk.org/jdk/pull/29368/files/d7126996..d10ecb18
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29368&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29368&range=01-02
Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/29368.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29368/head:pull/29368
PR: https://git.openjdk.org/jdk/pull/29368
More information about the hotspot-gc-dev
mailing list