RFR: JDK-8223244: Extend arraycopy stub GC interface to allow GC replacement of the whole loop

Roman Kennke rkennke at redhat.com
Thu May 2 21:42:59 UTC 2019


Currently, when doing oop arraycopy from C2 and C1, we call into runtime
for pre-barrier, then do the arraycopy as fast-blt-loop, then call into
runtime again for post-barrier.

In Shenandoah we would like to call into runtime once, and do the
arraycopy in a single-loop, when GC is active, and only do the
fast-blt-loop outside of GC.

This requires some GC interface changes to allow skipping the fast-loop
when it's not needed, and to also pass the element type for doing the
arraycopy loop and checkcasts in runtime.

For the most part, the change is to add the klass Register, and the
L_exit label to jump to. In aarch64, it also involves to actually
add+bind those labels, plus a very minor shuffling of code, in order to
preserve original element count before diving into the prologue.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8223240
Webrev:
http://cr.openjdk.java.net/~rkennke/JDK-8223244/webrev.00/

Testing: hotspot_gc_shenandoah, hotspot/tier1 (x86_64 and aarch64) will
jdk-submit before pushing. Also, tried with the prototype for
JDK-8222859 both x86_64 and aarch64.

Can I please get reviews?

Thanks,
Roman



More information about the hotspot-runtime-dev mailing list