--- a/hotspot/src/share/vm/code/codeCache.cpp Fri Mar 18 09:03:43 2011 -0700
+++ b/hotspot/src/share/vm/code/codeCache.cpp Fri Mar 18 15:52:42 2011 -0700
@@ -337,7 +337,6 @@
if (is_live) {
// Perform cur->oops_do(f), maybe just once per nmethod.
f->do_code_blob(cur);
- cur->fix_oop_relocations();
}
}
@@ -552,6 +551,19 @@
}
+void CodeCache::verify_oops() {
+ MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
+ VerifyOopClosure voc;
+ FOR_ALL_ALIVE_BLOBS(cb) {
+ if (cb->is_nmethod()) {
+ nmethod *nm = (nmethod*)cb;
+ nm->oops_do(&voc);
+ nm->verify_oop_relocations();
+ }
+ }
+}
+
+
address CodeCache::first_address() {
assert_locked_or_safepoint(CodeCache_lock);
return (address)_heap->begin();