RFR: 8251397: Add release fence to ClassValueMap constructor
Aleksey Shipilev
shade at openjdk.java.net
Sat Sep 12 12:11:11 UTC 2020
On Wed, 9 Sep 2020 13:04:38 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Updated PR.
>
> Now I wonder (after reading the discussion), why not `UNSAFE.storeStoreFence()`? I am basically okay with either, given
> they currently map to the same thing. But it seems that semantically only `storeStoreFence` is really needed here.
Scratch that. Hotspot does `MemBar_Release` for final stores, low-level Java code is better do the same:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/parse1.cpp#L1005
It deserves a separate follow-up to homogenize the uses of `Unsafe.storeStoreFence` and `Unsafe.storeFence` in other
places in JDK.
-------------
PR: https://git.openjdk.java.net/jdk/pull/94
More information about the core-libs-dev
mailing list