comparison 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
comparison
equal deleted inserted replaced
2370:048f98400b8e 2375:d673ef06fe96
763 } 763 }
764 } 764 }
765 765
766 protected: 766 protected:
767 // platform-dependent utilities for decoding and patching instructions 767 // platform-dependent utilities for decoding and patching instructions
768 void pd_set_data_value (address x, intptr_t off); // a set or mem-ref 768 void pd_set_data_value (address x, intptr_t off, bool verify_only = false); // a set or mem-ref
769 void pd_verify_data_value (address x, intptr_t off) { pd_set_data_value(x, off, true); }
769 address pd_call_destination (address orig_addr = NULL); 770 address pd_call_destination (address orig_addr = NULL);
770 void pd_set_call_destination (address x); 771 void pd_set_call_destination (address x);
771 void pd_swap_in_breakpoint (address x, short* instrs, int instrlen); 772 void pd_swap_in_breakpoint (address x, short* instrs, int instrlen);
772 void pd_swap_out_breakpoint (address x, short* instrs, int instrlen); 773 void pd_swap_out_breakpoint (address x, short* instrs, int instrlen);
773 static int pd_breakpoint_size (); 774 static int pd_breakpoint_size ();
877 void set_value(address x, intptr_t o) { 878 void set_value(address x, intptr_t o) {
878 if (addr_in_const()) 879 if (addr_in_const())
879 *(address*)addr() = x; 880 *(address*)addr() = x;
880 else 881 else
881 pd_set_data_value(x, o); 882 pd_set_data_value(x, o);
883 }
884 void verify_value(address x) {
885 if (addr_in_const())
886 assert(*(address*)addr() == x, "must agree");
887 else
888 pd_verify_data_value(x, offset());
882 } 889 }
883 890
884 // The "o" (displacement) argument is relevant only to split relocations 891 // The "o" (displacement) argument is relevant only to split relocations
885 // on RISC machines. In some CPUs (SPARC), the set-hi and set-lo ins'ns 892 // on RISC machines. In some CPUs (SPARC), the set-hi and set-lo ins'ns
886 // can encode more than 32 bits between them. This allows compilers to 893 // can encode more than 32 bits between them. This allows compilers to
947 // data is packed in "2_ints" format: [i o] or [Ii Oo] 954 // data is packed in "2_ints" format: [i o] or [Ii Oo]
948 void pack_data_to(CodeSection* dest); 955 void pack_data_to(CodeSection* dest);
949 void unpack_data(); 956 void unpack_data();
950 957
951 void fix_oop_relocation(); // reasserts oop value 958 void fix_oop_relocation(); // reasserts oop value
959
960 void verify_oop_relocation();
952 961
953 address value() { return (address) *oop_addr(); } 962 address value() { return (address) *oop_addr(); }
954 963
955 bool oop_is_immediate() { return oop_index() == 0; } 964 bool oop_is_immediate() { return oop_index() == 0; }
956 965