RFR: 8377713: Shenandoah: Convert ShenandoahReferenceProcessor to use Atomic<T>
Aleksey Shipilev
shade at openjdk.org
Wed Feb 18 08:29:05 UTC 2026
On Tue, 17 Feb 2026 19:29:29 GMT, Ben Taylor <btaylor 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_r2820973819
More information about the shenandoah-dev
mailing list