RFR: 8375974: G1: Convert G1FullCollector to use Atomic<T>
Thomas Schatzl
tschatzl at openjdk.org
Wed Jan 21 18:04:33 UTC 2026
On Wed, 21 Jan 2026 17:58:47 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Idk. I think it is just about the `_compaction_tops` being aligned, i.e. can be atomically read. Also to just indicate that the array is accessed concurrently.
>>
>> I can remove these completely if wanted.
>
> There wasn't any alignment futzing in the old code, so I don't think that's it.
> I've not looked to see if it can be removed; I was asking if you knew the answer.
The compaction_tops are written in one phase of full gc, and read in other phases, both in parallel, but the writing is non-overlapping (and reads do not matter).
The only reason I can think of is to indicate that the elements are accessed in parallel.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29342#discussion_r2713729502
More information about the hotspot-gc-dev
mailing list