1.1 --- a/src/share/vm/code/relocInfo.hpp Fri Mar 18 09:03:43 2011 -0700 1.2 +++ b/src/share/vm/code/relocInfo.hpp Fri Mar 18 15:52:42 2011 -0700 1.3 @@ -765,7 +765,8 @@ 1.4 1.5 protected: 1.6 // platform-dependent utilities for decoding and patching instructions 1.7 - void pd_set_data_value (address x, intptr_t off); // a set or mem-ref 1.8 + void pd_set_data_value (address x, intptr_t off, bool verify_only = false); // a set or mem-ref 1.9 + void pd_verify_data_value (address x, intptr_t off) { pd_set_data_value(x, off, true); } 1.10 address pd_call_destination (address orig_addr = NULL); 1.11 void pd_set_call_destination (address x); 1.12 void pd_swap_in_breakpoint (address x, short* instrs, int instrlen); 1.13 @@ -880,6 +881,12 @@ 1.14 else 1.15 pd_set_data_value(x, o); 1.16 } 1.17 + void verify_value(address x) { 1.18 + if (addr_in_const()) 1.19 + assert(*(address*)addr() == x, "must agree"); 1.20 + else 1.21 + pd_verify_data_value(x, offset()); 1.22 + } 1.23 1.24 // The "o" (displacement) argument is relevant only to split relocations 1.25 // on RISC machines. In some CPUs (SPARC), the set-hi and set-lo ins'ns 1.26 @@ -950,6 +957,8 @@ 1.27 1.28 void fix_oop_relocation(); // reasserts oop value 1.29 1.30 + void verify_oop_relocation(); 1.31 + 1.32 address value() { return (address) *oop_addr(); } 1.33 1.34 bool oop_is_immediate() { return oop_index() == 0; }