comparison src/share/vm/opto/parse2.cpp @ 246:9b66e6287f4a

6707044: uncommon_trap of ifnull bytecode leaves garbage on expression stack Summary: Remove call to repush_if_args() Reviewed-by: kvn, jrose
author rasbold
date Wed, 16 Jul 2008 10:08:57 -0700
parents 9c2ecc2ffb12
children 18aab3cdd513
comparison
equal deleted inserted replaced
245:4a4c365f777d 246:9b66e6287f4a
873 // counts would keep the program recompiling indefinitely. 873 // counts would keep the program recompiling indefinitely.
874 bool Parse::seems_never_taken(float prob) { 874 bool Parse::seems_never_taken(float prob) {
875 return prob < PROB_MIN; 875 return prob < PROB_MIN;
876 } 876 }
877 877
878 //-------------------------------repush_if_args--------------------------------
879 // Push arguments of an "if" bytecode back onto the stack by adjusting _sp.
878 inline void Parse::repush_if_args() { 880 inline void Parse::repush_if_args() {
879 #ifndef PRODUCT 881 #ifndef PRODUCT
880 if (PrintOpto && WizardMode) { 882 if (PrintOpto && WizardMode) {
881 tty->print("defending against excessive implicit null exceptions on %s @%d in ", 883 tty->print("defending against excessive implicit null exceptions on %s @%d in ",
882 Bytecodes::name(iter().cur_bc()), iter().cur_bci()); 884 Bytecodes::name(iter().cur_bc()), iter().cur_bci());
904 // (An earlier version of do_ifnull omitted this trap for OSR methods.) 906 // (An earlier version of do_ifnull omitted this trap for OSR methods.)
905 #ifndef PRODUCT 907 #ifndef PRODUCT
906 if (PrintOpto && Verbose) 908 if (PrintOpto && Verbose)
907 tty->print_cr("Never-taken backedge stops compilation at bci %d",bci()); 909 tty->print_cr("Never-taken backedge stops compilation at bci %d",bci());
908 #endif 910 #endif
909 repush_if_args(); // to gather stats on loop
910 // We need to mark this branch as taken so that if we recompile we will 911 // We need to mark this branch as taken so that if we recompile we will
911 // see that it is possible. In the tiered system the interpreter doesn't 912 // see that it is possible. In the tiered system the interpreter doesn't
912 // do profiling and by the time we get to the lower tier from the interpreter 913 // do profiling and by the time we get to the lower tier from the interpreter
913 // the path may be cold again. Make sure it doesn't look untaken 914 // the path may be cold again. Make sure it doesn't look untaken
914 profile_taken_branch(target_bci, !ProfileInterpreter); 915 profile_taken_branch(target_bci, !ProfileInterpreter);