[aarch64-port-dev ] RFR: aarch64: improve _unsafe_arraycopy stub routine
Felix Yang
felix.yang at linaro.org
Mon Mar 28 15:25:22 UTC 2016
Hi,
Please review webrev:
http://cr.openjdk.java.net/~fyang/8152840/webrev.00/
JIRA issue: https://bugs.openjdk.java.net/browse/JDK-8152840
Patch improves _unsafe_arraycopy stub by checking the alignment of the
src, dest, and count, and call some faster arraycopy stubs (say
StubRoutines::_jshort_arraycopy). About 1%+ performance gain on Spark
Terasort benchmark by this improvement.
Here is the disassembly of the new stub routine code:
StubRoutines::unsafe_arraycopy [0x0000007f8c93a000, 0x0000007f8c93a040[
(64 bytes)
0x0000007f8c93a000: stp x29, x30, [sp,#-16]!
0x0000007f8c93a004: mov x29, sp
0x0000007f8c93a008: orr x8, x0, x1
0x0000007f8c93a00c: orr x8, x8, x2
0x0000007f8c93a010: and x8, x8, #0x7
0x0000007f8c93a014: cbz x8, Stub::unsafe_arraycopy+56
0x0000007f8c93a038
0x0000007f8c93a018: and x8, x8, #0x3
0x0000007f8c93a01c: cbz x8, Stub::unsafe_arraycopy+48
0x0000007f8c93a030
0x0000007f8c93a020: tbz w8, #0, Stub::unsafe_arraycopy+40
0x0000007f8c93a028
0x0000007f8c93a024: b Stub::jbyte_arraycopy+8 0x0000007f8c938d68
0x0000007f8c93a028: lsr x2, x2, #1
0x0000007f8c93a02c: b Stub::jshort_arraycopy+8 0x0000007f8c938fd4
0x0000007f8c93a030: lsr x2, x2, #2
0x0000007f8c93a034: b Stub::jint_arraycopy+8 0x0000007f8c9392fc
0x0000007f8c93a038: lsr x2, x2, #3
0x0000007f8c93a03c: b Stub::arrayof_jlong_arraycopy+8 0x0000007f8c9393d4
Tested with JTreg hotspot & langtools, is it OK?
BTW: The _unsafe_arraycopy and _generic_arraycopy stubs are missing for
jdk8u, I would like to backport them from jdk9 later.
Thanks,
Felix
More information about the aarch64-port-dev
mailing list