RFR: 8377713: Shenandoah: Convert ShenandoahReferenceProcessor to use Atomic<T>
William Kemper
wkemper at openjdk.org
Thu Feb 19 22:19:59 UTC 2026
On Wed, 18 Feb 2026 08:25:58 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Modernizes the code as has been done in other areas of Shenandoah and G1 GCs.
>>
>> The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC
>
> src/hotspot/share/gc/shenandoah/shenandoahReferenceProcessor.cpp line 522:
>
>> 520: // Process discovered references
>> 521: uint max_workers = ShenandoahHeap::heap()->max_workers();
>> 522: uint worker_id = _iterate_discovered_list_id.add_then_fetch(1U, memory_order_relaxed) - 1;
>
> Here and later: use `fetch_then_add`, and drop `-1`?
👍
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29767#discussion_r2830428581
More information about the shenandoah-dev
mailing list