[aarch64-port-dev ] RFR: [8u] 8209835: Aarch64: elide barriers on all volatile operations
Andrew Haley
aph at redhat.com
Wed Aug 28 08:04:45 UTC 2019
On 8/28/19 8:01 AM, Yangfei (Felix) wrote:
> Webrev: http://cr.openjdk.java.net/~fyang/8209835-8u-backport/webrev.00/
> Changes related to CompareAndExchange* and WeakCompareAndSwap* in the original patch are not needed for the aarch64 8u repo.
>
> Volatile access inconsistency still exists for some unsafe operations. One example is AtomicReference.
> For the volatile field 'value', compareAndSet() method accesses it through unsafe.compareAndSwapObject().
> And getAndSet() method accessed it through unsafe.getAndSetObject().
> Currently, C2 will emit ldar & stlr to implement unsafe.compareAndSwapObject(), but that is not the case for unsafe.getAndSetObject().
>
> C2 still emits explicit dmb instructions to implement unsafe.getAndSetObject().
I am not convinced. Please provide me with a test case of incorrect behaviour.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list