8057570: RedefineClasses() tests fail assert(((Metadata*)obj)->is_valid()) failed: obj is valid
authorcoleenp
Fri, 05 Sep 2014 08:08:51 -0400
changeset 26563 d6561f9d04f2
parent 26562 c2e144c5b6a2
child 26564 2caee34956f2
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
hotspot/src/share/vm/code/nmethod.cpp
hotspot/src/share/vm/memory/universe.cpp
--- 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