RFR: 8375622: G1: Convert G1CodeRootSet to use Atomic<T>

Thomas Schatzl tschatzl at openjdk.org
Tue Jan 20 08:07:32 UTC 2026


On Mon, 19 Jan 2026 15:37:35 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this change to convert `G1CodeRootSet` to use `Atomic<T>` instead of `AtomicAccess`.
>> 
>> Testing: gha,
>> 
>> Thanks,
>>   Thomas
>
> src/hotspot/share/gc/g1/g1CodeRootSet.hpp line 29:
> 
>> 27: 
>> 28: #include "code/codeCache.hpp"
>> 29: #include "runtime/atomic.hpp"
> 
> Yeah, but why here? The `Atomic<size_t>` is fully in `.cpp`, so better include in there, instead of (potentially popular) header?

Because of mechanical conversion, no particular intent. Will fix. :(

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29296#discussion_r2707212126


More information about the hotspot-gc-dev mailing list