RFR: JDK-8198445: Access API for primitive/native arraycopy
Roman Kennke
rkennke at redhat.com
Tue Mar 6 11:56:50 UTC 2018
Currently, the Access API is only used for oop-arraycopy, but not for
primitive arraycopy. GCs might want to intercept this too, e.g. resolve
src and dst arrays.
There *is* an implementation of primitive arraycopy in the Access API,
but it doesn't even compile, because Raw::arraycopy() does not take src
and dst oop operands, but it's called like that. The only reason why
this does not blow up (I think) is that because nobody calls it, the
compiler doesn't even get there.
This change fixes the Access API/impl and adds the relevant calls into
it (in C1 and runtime land). C2 uses arraycopy stubs (which cannot be
handled here) or calls out to the ArrayKlass::copy_array(), which should
be covered with this change.
It should be possible to use the same Access API for Java-array <->
native-array bulk transfers, which currently use the rather ugly
typeArrayOop::XYZ_addr() + memcpy() pattern. I'll address that in a
separate change though.
http://cr.openjdk.java.net/~rkennke/8198445/webrev.00/
Tests: tier1 ok
Please review!
Thanks, Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180306/19df2e99/signature.asc>
More information about the hotspot-gc-dev
mailing list