1064 return false;
1065 }
1066
1067
1068 void nmethod::fix_oop_relocations(address begin, address end, bool initialize_immediates) {
1069 // re-patch all oop-bearing instructions, just in case some oops moved
1070 RelocIterator iter(this, begin, end);
1071 while (iter.next()) {
1072 if (iter.type() == relocInfo::oop_type) {
1073 oop_Relocation* reloc = iter.oop_reloc();
1074 if (initialize_immediates && reloc->oop_is_immediate()) {
1075 oop* dest = reloc->oop_addr();
1076 initialize_immediate_oop(dest, (jobject) *dest);
1077 }
1078 // Refresh the oop-related bits of this instruction.
1079 reloc->fix_oop_relocation();
1080 } else if (iter.type() == relocInfo::metadata_type) {
1081 metadata_Relocation* reloc = iter.metadata_reloc();
1082 reloc->fix_metadata_relocation();
1083 }
1084
1085 // There must not be any interfering patches or breakpoints.
1086 assert(!(iter.type() == relocInfo::breakpoint_type
1087 && iter.breakpoint_reloc()->active()),
1088 "no active breakpoint");
1089 }
1090 }
1091
1092
1093 void nmethod::verify_oop_relocations() {
1094 // Ensure sure that the code matches the current oop values
1095 RelocIterator iter(this, NULL, NULL);
1096 while (iter.next()) {
1097 if (iter.type() == relocInfo::oop_type) {
1098 oop_Relocation* reloc = iter.oop_reloc();
1099 if (!reloc->oop_is_immediate()) {
1100 reloc->verify_oop_relocation();
1101 }
1102 }
1103 }
1104 }
1105
1106
1107 ScopeDesc* nmethod::scope_desc_at(address pc) {
1108 PcDesc* pd = pc_desc_at(pc);
|
1064 return false;
1065 }
1066
1067
1068 void nmethod::fix_oop_relocations(address begin, address end, bool initialize_immediates) {
1069 // re-patch all oop-bearing instructions, just in case some oops moved
1070 RelocIterator iter(this, begin, end);
1071 while (iter.next()) {
1072 if (iter.type() == relocInfo::oop_type) {
1073 oop_Relocation* reloc = iter.oop_reloc();
1074 if (initialize_immediates && reloc->oop_is_immediate()) {
1075 oop* dest = reloc->oop_addr();
1076 initialize_immediate_oop(dest, (jobject) *dest);
1077 }
1078 // Refresh the oop-related bits of this instruction.
1079 reloc->fix_oop_relocation();
1080 } else if (iter.type() == relocInfo::metadata_type) {
1081 metadata_Relocation* reloc = iter.metadata_reloc();
1082 reloc->fix_metadata_relocation();
1083 }
1084 }
1085 }
1086
1087
1088 void nmethod::verify_oop_relocations() {
1089 // Ensure sure that the code matches the current oop values
1090 RelocIterator iter(this, NULL, NULL);
1091 while (iter.next()) {
1092 if (iter.type() == relocInfo::oop_type) {
1093 oop_Relocation* reloc = iter.oop_reloc();
1094 if (!reloc->oop_is_immediate()) {
1095 reloc->verify_oop_relocation();
1096 }
1097 }
1098 }
1099 }
1100
1101
1102 ScopeDesc* nmethod::scope_desc_at(address pc) {
1103 PcDesc* pd = pc_desc_at(pc);
|