hotspot/src/share/vm/interpreter/rewriter.cpp
changeset 5697 0cf7190475ee
parent 5688 9052dc91ea67
child 5702 201c5cde25bb
--- a/hotspot/src/share/vm/interpreter/rewriter.cpp	Fri May 28 16:23:51 2010 -0700
+++ b/hotspot/src/share/vm/interpreter/rewriter.cpp	Sat May 29 19:22:32 2010 -0700
@@ -307,5 +307,19 @@
 
     // Set up method entry points for compiler and interpreter.
     m->link_method(m, CHECK);
+
+#ifdef ASSERT
+    if (StressMethodComparator) {
+      static int nmc = 0;
+      for (int j = i; j >= 0 && j >= i-4; j--) {
+        if ((++nmc % 1000) == 0)  tty->print_cr("Have run MethodComparator %d times...", nmc);
+        bool z = MethodComparator::methods_EMCP(m(), (methodOop)_methods->obj_at(j));
+        if (j == i && !z) {
+          tty->print("MethodComparator FAIL: "); m->print(); m->print_codes();
+          assert(z, "method must compare equal to itself");
+        }
+      }
+    }
+#endif //ASSERT
   }
 }