--- old/src/cpu/x86/vm/templateInterpreter_x86_64.cpp 2015-10-14 13:53:41.657676819 +0200 +++ new/src/cpu/x86/vm/templateInterpreter_x86_64.cpp 2015-10-14 13:53:41.544679551 +0200 @@ -545,6 +545,7 @@ #endif // ASSERT __ bind(done); + oopDesc::bs()->interpreter_write_barrier(_masm, rax); } // add space for monitor & lock @@ -637,7 +638,7 @@ const int referent_offset = java_lang_ref_Reference::referent_offset; guarantee(referent_offset > 0, "referent offset not initialized"); - if (UseG1GC) { + if (UseG1GC || UseShenandoahGC) { Label slow_path; // rbx: method @@ -648,6 +649,8 @@ __ testptr(rax, rax); __ jcc(Assembler::zero, slow_path); + oopDesc::bs()->interpreter_read_barrier_not_null(_masm, rax); + // rax: local 0 // rbx: method (but can be used as scratch now) // rdx: scratch @@ -778,6 +781,7 @@ __ movl(crc, Address(rsp, 5*wordSize)); // Initial CRC } else { __ movptr(buf, Address(rsp, 3*wordSize)); // byte[] array + oopDesc::bs()->interpreter_read_barrier_not_null(_masm, buf); __ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size __ movl2ptr(off, Address(rsp, 2*wordSize)); // offset __ addq(buf, off); // + offset