RFR: [11u] 8209835: Aarch64: elide barriers on all volatile operations

Yangfei (Felix) felix.yang at huawei.com
Fri Aug 23 06:06:07 UTC 2019


Hi,



Could I have a review for this backport to jdk11u-dev please?



  Webrev: http://cr.openjdk.java.net/~fyang/8209835-11u-backport/webrev.00/



  Bug: https://bugs.openjdk.java.net/browse/JDK-8209835

  Upstream patch: http://hg.openjdk.java.net/jdk/jdk/rev/87bc444ca642



The original patch does not apply cleanly due to use of new Unsafe methods in three newly added tests.

Tweaks for the three tests:



1)test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAE.java

< +        return unsafe.compareAndExchangeReference(this, f_obj_off, x, o);

---

> +        return unsafe.compareAndExchangeObject(this, f_obj_off, x, o);



  2)test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAS.java

<          unsafe.compareAndSetReference(this, f_obj_off, x, o);

---

>          unsafe.compareAndSetObject(this, f_obj_off, x, o);



< +        return unsafe.getAndSetReference(this, f_obj_off, o);

---

> +        return unsafe.getAndSetObject(this, f_obj_off, o);



  3)test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileWeakCAS.java

  < +        return unsafe.weakCompareAndSetReference(this, f_obj_off, x, o);

---

> +        return unsafe.weakCompareAndSetObject(this, f_obj_off, x, o);



Testing:  Passed tier1 on aarch64.

Newly added JTreg tests succeed with aarch64 fastdebug build.
          Passed jcstress test with aarch64 release build.

Thanks,
Felix


More information about the jdk-updates-dev mailing list