[aarch64-port-dev ] Fix aarch64-8u jcstress test failure on ARMv8.1 platform
Yangfei (Felix)
felix.yang at huawei.com
Mon Feb 25 07:53:05 UTC 2019
Hi,
I find that the support for ARMv8.1 LSE atomic operations is different in implementation for aarch64-8u and jdk9+.
The corresponding issue is: https://bugs.openjdk.java.net/browse/JDK-8151775
Previously, there were two patches for this issue:
v1: http://cr.openjdk.java.net/~enevill/8151775/webrev/
v2: http://cr.openjdk.java.net/~enevill/8151775/webrev.2/
The v1 patch was once rejected by aph in: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-March/022001.html
So for jdk9+, we are using the v2 patch: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/03fb00b96355
But for aarch64-8u branches, we are still using the v1 patch.
Except for the issues mentioned by aph about the v1 patch, this patch is also causing the jcstress test failures with the latest aarch64-8u jdk, which is easy to reproduce.
One failed case is : o.o.j.t.memeffects.basic.atomic.AtomicInteger.atomic_get_getAndSet_boolean under JVM args: [-client, -XX:TieredStopAtLevel=1, -Xcomp].
The reason is that the v1 patch uses a LSE "swp" instruction for the" lir_xchg" case in LIR_Assembler::atomic_op, which is lacking the necessary acquire & release semantics.
The v2 patch is uses a LSE "swpal" instruction instead, .
This issue can be fixed by reverting the v1 patch and backporting the v2 patch from jdk9+, which also makes the support for ARMv8.1 LSE atomic operations consistent.
Webrev: http://cr.openjdk.java.net/~fyang/lse-8u-backports/webrev.00/
This webrev also incorporates one trivial fix for the v2 patch:
https://bugs.openjdk.java.net/browse/JDK-8153172
http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/8911d94e888b
JCstress tested on both ARMv8 and ARMv8.1 platforms. Also ran JTreg test on both platforms.
OK to backport?
Thanks,
Felix
More information about the aarch64-port-dev
mailing list