< prev index next > src/hotspot/share/code/nmethod.cpp
Print this page
void nmethod::finalize_relocations() {
NoSafepointVerifier nsv;
GrowableArray<NativeMovConstReg*> virtual_call_data;
+ BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
+
// Make sure that post call nops fill in nmethod offsets eagerly so
// we don't have to race with deoptimization
RelocIterator iter(this);
while (iter.next()) {
if (iter.type() == relocInfo::virtual_call_type) {
virtual_call_data.append(value);
} else if (iter.type() == relocInfo::post_call_nop_type) {
post_call_nop_Relocation* const reloc = iter.post_call_nop_reloc();
address pc = reloc->addr();
install_post_call_nop_displacement(this, pc);
+ } else if (iter.type() == relocInfo::patchable_barrier_type) {
+ patchable_barrier_Relocation* const reloc = iter.patchable_barrier_reloc();
+ bs_nm->patch_barrier_relocation(reloc);
}
}
if (virtual_call_data.length() > 0) {
// We allocate a block of CompiledICData per nmethod so the GC can purge this faster.
barrier_Relocation* const reloc = iter.barrier_reloc();
stringStream st;
st.print("barrier format=%d", reloc->format());
return st.as_string();
}
+ case relocInfo::patchable_barrier_type: {
+ patchable_barrier_Relocation* const reloc = iter.patchable_barrier_reloc();
+ stringStream st;
+ st.print("patchable_barrier metadata=%d", reloc->metadata());
+ return st.as_string();
+ }
case relocInfo::type_mask: return "type_bit_mask";
default: {
stringStream st;
< prev index next >