RFR(S): 8165489: Missing G1 barrier in Unsafe_GetObjectVolatile

Kim Barrett kim.barrett at oracle.com
Wed Sep 14 15:35:13 UTC 2016


> On Sep 13, 2016, at 1:54 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
> ------------------------------------------------------------------------------
> src/share/vm/prims/unsafe.cpp 
> 279 static bool is_java_lang_ref_Reference_access(oop o, jlong offset) {
> 280   if (offset == java_lang_ref_Reference::referent_offset && o != NULL) {
> 
> The null test is superfluous, since we've already accessed a field
> from it.  (Though the compiler should be able to optimize it away.)
> 
> ------------------------------------------------------------------------------

Ignore that comment; I forgot about the NULL base + absolute offset form.



More information about the hotspot-gc-dev mailing list