[10] RFR(S): 8186297: AARCH64: Intrinsify Unsafe.compareAndSetByte and compareAndSetShort
Dmitrij Pochepko
dmitrij.pochepko at bell-sw.com
Wed Aug 16 15:13:26 UTC 2017
Hi,
please review small diff for JDK-8186297: AARCH64: Intrinsify
Unsafe.compareAndSetByte and compareAndSetShort
This small patch adds intrinsic for Unsafe::compareAndSetByte and
Unsafe::compareAndSetShort in a same manner as existing
compareAndSetInt/Long intrinsics are implemented.
Intrinsic has shorter code with less barriers and overall instruction count.
Generated assembly examples for short method:
private static void testMethod() {
unsafe.compareAndSetByte(null, BYTE_ARRAY_ADDR, (byte)0, (byte)1);
}
are here:
- baseline version:
http://cr.openjdk.java.net/~dpochepk/8186297/baseline_byte_assembly.txt
- intrinsified version:
http://cr.openjdk.java.net/~dpochepk/8186297/intrinsic_byte_assembly.txt
I also created small benchmark which demonstrates performance
difference(10-15%). Benchmark code is here:
http://cr.openjdk.java.net/~dpochepk/8186297/UnsafeBench.java (should be
launched with --add-opens java.base/jdk.internal.misc=ALL-UNNAMED to
have access to unsafe)
Performance results for ThunderX T88 are here:
http://cr.openjdk.java.net/~dpochepk/8186297/ThunderX_T88_results.txt
Performance results to Cortex A53 (R-Pi 3) are here:
http://cr.openjdk.java.net/~dpochepk/8186297/CortexA53_results.txt
webrev: http://cr.openjdk.java.net/~dpochepk/8186297/webrev.01/
CR: https://bugs.openjdk.java.net/browse/JDK-8186297
I also run hotspot jtreg tests in compiler/unsafe/* and found no
regressions.
Thanks,
Dmitrij
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170816/987a7144/attachment.html>
More information about the hotspot-compiler-dev
mailing list