hotspot/src/share/vm/code/nmethod.cpp
changeset 26558 b7df27df6384
parent 25492 d27050bdfb04
child 26563 d6561f9d04f2
--- a/hotspot/src/share/vm/code/nmethod.cpp	Wed Sep 03 14:43:49 2014 +0200
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Wed Sep 03 19:13:18 2014 -0400
@@ -2062,7 +2062,7 @@
                "metadata must be found in exactly one place");
         if (r->metadata_is_immediate() && r->metadata_value() != NULL) {
           Metadata* md = r->metadata_value();
-          f(md);
+          if (md != _method) f(md);
         }
       } else if (iter.type() == relocInfo::virtual_call_type) {
         // Check compiledIC holders associated with this nmethod
@@ -2087,9 +2087,6 @@
     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) {