src/share/vm/interpreter/rewriter.cpp

changeset 1929
1eb493f33423
parent 1920
ab102d5d923e
child 1934
e9ff18c4ace7
     1.1 --- a/src/share/vm/interpreter/rewriter.cpp	Fri May 28 16:23:51 2010 -0700
     1.2 +++ b/src/share/vm/interpreter/rewriter.cpp	Sat May 29 19:22:32 2010 -0700
     1.3 @@ -307,5 +307,19 @@
     1.4  
     1.5      // Set up method entry points for compiler and interpreter.
     1.6      m->link_method(m, CHECK);
     1.7 +
     1.8 +#ifdef ASSERT
     1.9 +    if (StressMethodComparator) {
    1.10 +      static int nmc = 0;
    1.11 +      for (int j = i; j >= 0 && j >= i-4; j--) {
    1.12 +        if ((++nmc % 1000) == 0)  tty->print_cr("Have run MethodComparator %d times...", nmc);
    1.13 +        bool z = MethodComparator::methods_EMCP(m(), (methodOop)_methods->obj_at(j));
    1.14 +        if (j == i && !z) {
    1.15 +          tty->print("MethodComparator FAIL: "); m->print(); m->print_codes();
    1.16 +          assert(z, "method must compare equal to itself");
    1.17 +        }
    1.18 +      }
    1.19 +    }
    1.20 +#endif //ASSERT
    1.21    }
    1.22  }

mercurial