RFR: 8374678: ZGC: Convert zForwarding to use Atomic<T>

Stefan Karlsson stefank at openjdk.org
Wed Jan 14 08:26:27 UTC 2026


On Wed, 14 Jan 2026 08:07:12 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> Convert usages of AtomicAccess to Atomic<T> in zForwarding.
> 
> `_ref_count` is unused by the SA. There is currently no implementation of Atomic<T> in SA.
> 
> Testing:
>  * GHA
>  * Tier 1-2 with ZGC linux x64 and linux aarch64
>  * Stress tests with ZGC linux x64 and linux aarch64

Marked as reviewed by stefank (Reviewer).

src/hotspot/share/gc/z/zForwarding.cpp line 52:

> 50: 
> 51: bool ZForwarding::claim() {
> 52:   return _claimed.compare_exchange(false, true) == false;

Can this be the new compare_set?

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

PR Review: https://git.openjdk.org/jdk/pull/29220#pullrequestreview-3659454614
PR Review Comment: https://git.openjdk.org/jdk/pull/29220#discussion_r2689439598


More information about the hotspot-gc-dev mailing list