RFR: 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic<T> [v2]
Stefan Karlsson
stefank at openjdk.org
Tue Jan 27 14:27:09 UTC 2026
On Mon, 26 Jan 2026 10:03:18 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
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>
> * reviews
Clearing "Request changes"
Marked as reviewed by stefank (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/29368#pullrequestreview-3711503253
PR Review: https://git.openjdk.org/jdk/pull/29368#pullrequestreview-3711506378
More information about the hotspot-gc-dev
mailing list