RFR: 8198286: Direct memory accessors in typeArrayOop.hpp should use Access API

Roman Kennke rkennke at redhat.com
Fri Feb 16 16:18:02 UTC 2018


The direct memory accessors in typeArrayOop.hpp, which are usually
used for bulk memory access operations, should use the Access API, in
order to give the garbage collector a chance to intercept the access
(for example, employ read- or write-barriers on the target array).
This also means it's necessary to distinguish between write-accesses
and read-accesses (for example, GCs might want to use a
copy-on-write-barrier for write-accesses only).

This changeset introduces two new APIs in access.hpp: load_at_addr()
and store_at_addr(), and links it up to the corresponding X_get_addr()
and X_put_addr() in typeArrayOop.hpp. All uses of the previous
X_addr() accessors have been renamed to match their use (load or store
of primitive array elements).

The changeset is based on the previously proposed:
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2018-February/026426.html

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

Please review!

Thanks,
Roman


More information about the hotspot-runtime-dev mailing list