Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/rewriter.cpp @ 1574:1eb493f33423
6957080: MethodComparator needs stress testing
Summary: Add a stress-test flag for running MethodComparator over many inputs. Fix bugs that crop up.
Reviewed-by: kvn
author | jrose |
---|---|
date | Sat, 29 May 2010 19:22:32 -0700 |
parents | ab102d5d923e |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1573:beb77f0d41b3 | 1574:1eb493f33423 |
---|---|
305 _methods->obj_at_put(i, m()); | 305 _methods->obj_at_put(i, m()); |
306 } | 306 } |
307 | 307 |
308 // Set up method entry points for compiler and interpreter. | 308 // Set up method entry points for compiler and interpreter. |
309 m->link_method(m, CHECK); | 309 m->link_method(m, CHECK); |
310 } | 310 |
311 } | 311 #ifdef ASSERT |
312 if (StressMethodComparator) { | |
313 static int nmc = 0; | |
314 for (int j = i; j >= 0 && j >= i-4; j--) { | |
315 if ((++nmc % 1000) == 0) tty->print_cr("Have run MethodComparator %d times...", nmc); | |
316 bool z = MethodComparator::methods_EMCP(m(), (methodOop)_methods->obj_at(j)); | |
317 if (j == i && !z) { | |
318 tty->print("MethodComparator FAIL: "); m->print(); m->print_codes(); | |
319 assert(z, "method must compare equal to itself"); | |
320 } | |
321 } | |
322 } | |
323 #endif //ASSERT | |
324 } | |
325 } |