On Thu, 28 Oct 2021 07:00:24 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 3449: >> >>> 3447: public final void storeStoreFence() { >>> 3448: // Without the special intrinsic, default to a stronger >>> storeFence, >>> 3449: // which is already intrinsified. >> >> Not clear me to me why we need to retain this fallback? > > Something should happen when intrinsic is disabled. Other fences have native > `Unsafe_{Load|Store|Full}Fence` entry points for this. We can, technically, > do the same here, but I see no need. Instead, we can fall back to the already > implemented stronger intrinsic. Thanks for clarifying. Now we have all the intrinsics in place we have the choice of delegating either at the Java level or the native level, where previously we had to delegate at the Java level to get the benefit of the storeFence intrinsic. But it is fine as-is. ------------- PR: https://git.openjdk.java.net/jdk/pull/6136