RFR: 8374688: ZGC: Convert zObjectAllocator to use Atomic<T>
Axel Boldt-Christmas
aboldtch at openjdk.org
Tue Jan 27 13:30:52 UTC 2026
Convert usages of AtomicAccess to Atomic<T> in zObjectAllocator.
Atomic<T> are not copy constructible so `retire_pages` does relaxed stores rather than a copy constructor (the previous version did plain stores). The compiler should have to emit similar instructions for these two versions. But will run some extra verification and check that the change is not noticeable in the pause times.
Testing:
* GHA
* HotSpot GC tests with ZGC linux x64 and linux aarch64
-------------
Commit messages:
- ZGC: Convert zObjectAllocator to use Atomic<T>
Changes: https://git.openjdk.org/jdk/pull/29447/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29447&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8374688
Stats: 31 lines in 2 files changed: 4 ins; 0 del; 27 mod
Patch: https://git.openjdk.org/jdk/pull/29447.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29447/head:pull/29447
PR: https://git.openjdk.org/jdk/pull/29447
More information about the hotspot-gc-dev
mailing list