RFR: 8371956: Convert OopStorage to use Atomic<T>
Stefan Karlsson
stefank at openjdk.org
Mon Nov 17 10:43:07 UTC 2025
On Sun, 16 Nov 2025 06:10:54 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to OopStorage to use Atomic<T> rather than directly
> applying AtomicAccess to volatile members.
>
> Testing: mach5 tier1-5
Looks like a good change.
There's one load_acquire below that isn't clear to me why it was used. I also noticed that we use `volatile` with `_owner_address`, is that because of the SafeFetch usage?
test/hotspot/gtest/gc/shared/test_oopStorage.cpp line 50:
> 48:
> 49: static ActiveArray& active_array(const OopStorage& storage) {
> 50: return *storage._active_array.load_acquire();
Is there a reason why this was changed to `load_acquire` instead of `load_relaxed`?
-------------
Marked as reviewed by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28338#pullrequestreview-3472054244
PR Review Comment: https://git.openjdk.org/jdk/pull/28338#discussion_r2533544999
More information about the hotspot-gc-dev
mailing list