RFR: 8204474: Have instanceRefKlass use HeapAccess when loading the referent

Per Liden per.liden at oracle.com
Wed Jun 6 14:16:32 UTC 2018


Hi,

To support concurrent reference processing in ZGC, 
instanceRefKlass::try_discover() can no longer use RawAccess to load the 
referent field. Instead it should use

   HeapAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>

or

   HeapAccess<ON_WEAK_OOP_REF | AS_NO_KEEPALIVE>

depending on the reference type. This patch also adjusts 
InstanceRefKlass::trace_reference_gc() for the same reason.

Bug: https://bugs.openjdk.java.net/browse/JDK-8204474
Webrev: http://cr.openjdk.java.net/~pliden/8204474/webrev.0

Testing: This patch has been part of the ZGC repository for quite some 
time and gone through various testing, including tier{1,2,3,4,5,6} in mach5.

/Per


More information about the hotspot-dev mailing list