RFR: JDK-8210752: Remaining explicit barriers for C2

Roman Kennke rkennke at redhat.com
Fri Sep 14 12:56:07 UTC 2018


Please review the following change:

JDK-8210187 introduced explicit barriers for C2. There've been a few
missing:
- Unsafe accesses also require explicit barriers when it's unknown if
the access is on-heap or off-heap. In this case, C2 turns the access
into a raw access, in which case the access_load/store APIs cannot
determine what to do. Emitting explicit barriers solves this for
Shenandoah: in case of raw access, base will be NULL, which gets handled
by a null-check (in this case the barrier is ignored), for on-heap
access, the null-check will fail and the barrier triggered correctly.
- One arraycopy barrier on dst erroneously emitted for ACCESS_READ where
it should be ACCESS_WRITE (my mistake)
- Object equality using CmpP requires stable oops, and thus barriers on
both operands.
- vectorizedMismatch() and copyMemory() also require explicit barriers
before building the addresses and feeding them into the calls.

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

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: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180914/3eadd5bf/signature.asc>


More information about the hotspot-gc-dev mailing list