src/share/vm/code/nmethod.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/code/nmethod.cpp Thu Mar 17 20:39:56 2011
--- new/src/share/vm/code/nmethod.cpp Thu Mar 17 20:39:56 2011
*** 1100,1109 ****
--- 1100,1123 ----
"no active breakpoint");
}
}
+ void nmethod::verify_oop_relocations() {
+ // Ensure sure that the code matches the current oop values
+ RelocIterator iter(this, NULL, NULL);
+ while (iter.next()) {
+ if (iter.type() == relocInfo::oop_type) {
+ oop_Relocation* reloc = iter.oop_reloc();
+ if (!reloc->oop_is_immediate()) {
+ reloc->verify_oop_relocation();
+ }
+ }
+ }
+ }
+
+
ScopeDesc* nmethod::scope_desc_at(address pc) {
PcDesc* pd = pc_desc_at(pc);
guarantee(pd != NULL, "scope must be present");
return new ScopeDesc(this, pd->scope_decode_offset(),
pd->obj_decode_offset(), pd->should_reexecute(),
*** 1820,1829 ****
--- 1834,1844 ----
nmethod* cur = _oops_do_mark_nmethods;
while (cur != NMETHOD_SENTINEL) {
assert(cur != NULL, "not NULL-terminated");
nmethod* next = cur->_oops_do_mark_link;
cur->_oops_do_mark_link = NULL;
+ cur->fix_oop_relocations();
NOT_PRODUCT(if (TraceScavenge) cur->print_on(tty, "oops_do, unmark\n"));
cur = next;
}
void* required = _oops_do_mark_nmethods;
void* observed = Atomic::cmpxchg_ptr(NULL, &_oops_do_mark_nmethods, required);
src/share/vm/code/nmethod.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File