8057570: RedefineClasses() tests fail assert(((Metadata*)obj)->is_valid()) failed: obj is valid
Summary: Revert two small changes from the previous-versions cleanup with marking code cache.
Reviewed-by: kvn, dcubed
--- a/hotspot/src/share/vm/code/nmethod.cpp Thu Sep 04 14:58:58 2014 -0400
+++ b/hotspot/src/share/vm/code/nmethod.cpp Fri Sep 05 08:08:51 2014 -0400
@@ -2087,6 +2087,9 @@
Metadata* md = *p;
f(md);
}
+
+ // Call function Method*, not embedded in these other places.
+ if (_method != NULL) f(_method);
}
void nmethod::oops_do(OopClosure* f, bool allow_zombie) {
--- a/hotspot/src/share/vm/memory/universe.cpp Thu Sep 04 14:58:58 2014 -0400
+++ b/hotspot/src/share/vm/memory/universe.cpp Fri Sep 05 08:08:51 2014 -0400
@@ -1256,8 +1256,8 @@
// Deoptimize all activations depending on marked nmethods
Deoptimization::deoptimize_dependents();
- // Make the dependent methods zombies (like VM_Deoptimize)
- CodeCache::make_marked_nmethods_zombies();
+ // Make the dependent methods not entrant (in VM_Deoptimize they are made zombies)
+ CodeCache::make_marked_nmethods_not_entrant();
}
}
#endif // HOTSWAP