Mercurial > hg > graal-compiler
diff src/share/vm/code/relocInfo.hpp @ 2375:d673ef06fe96
7028374: race in fix_oop_relocations for scavengeable nmethods
Reviewed-by: kvn
author | never |
---|---|
date | Fri, 18 Mar 2011 15:52:42 -0700 |
parents | b92c45f2bc75 |
children | 1d1603768966 479b4b4b6950 |
line wrap: on
line diff
--- a/src/share/vm/code/relocInfo.hpp Fri Mar 18 09:03:43 2011 -0700 +++ b/src/share/vm/code/relocInfo.hpp Fri Mar 18 15:52:42 2011 -0700 @@ -765,7 +765,8 @@ protected: // platform-dependent utilities for decoding and patching instructions - void pd_set_data_value (address x, intptr_t off); // a set or mem-ref + void pd_set_data_value (address x, intptr_t off, bool verify_only = false); // a set or mem-ref + void pd_verify_data_value (address x, intptr_t off) { pd_set_data_value(x, off, true); } address pd_call_destination (address orig_addr = NULL); void pd_set_call_destination (address x); void pd_swap_in_breakpoint (address x, short* instrs, int instrlen); @@ -880,6 +881,12 @@ else pd_set_data_value(x, o); } + void verify_value(address x) { + if (addr_in_const()) + assert(*(address*)addr() == x, "must agree"); + else + pd_verify_data_value(x, offset()); + } // The "o" (displacement) argument is relevant only to split relocations // on RISC machines. In some CPUs (SPARC), the set-hi and set-lo ins'ns @@ -950,6 +957,8 @@ void fix_oop_relocation(); // reasserts oop value + void verify_oop_relocation(); + address value() { return (address) *oop_addr(); } bool oop_is_immediate() { return oop_index() == 0; }