src/share/vm/runtime/simpleThresholdPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/simpleThresholdPolicy.cpp	Mon Jul 18 08:07:44 2011
--- new/src/share/vm/runtime/simpleThresholdPolicy.cpp	Mon Jul 18 08:07:43 2011

*** 204,218 **** --- 204,214 ---- return osr_nm; } // Check if the method can be compiled, change level if necessary void SimpleThresholdPolicy::compile(methodHandle mh, int bci, CompLevel level, TRAPS) { // Take the given ceiling into the account. // NOTE: You can set it to 1 to get a pure C1 version. if ((CompLevel)TieredStopAtLevel < level) { level = (CompLevel)TieredStopAtLevel; } + assert(level <= TieredStopAtLevel, "Invalid compilation level"); if (level == CompLevel_none) { return; } // Check if the method can be compiled. If it cannot be compiled with C1, continue profiling // in the interpreter and then compile with C2 (the transition function will request that,
*** 225,238 **** --- 221,234 ---- return; } if (bci != InvocationEntryBci && mh->is_not_osr_compilable()) { return; } + if (!CompileBroker::compilation_is_in_queue(mh, bci)) { if (PrintTieredEvents) { print_event(COMPILE, mh, mh, bci, level); } if (!CompileBroker::compilation_is_in_queue(mh, bci)) { submit_compile(mh, bci, level, THREAD); } } // Tell the broker to compile the method
*** 286,301 **** --- 282,298 ---- return false; } // Common transition function. Given a predicate determines if a method should transition to another level. CompLevel SimpleThresholdPolicy::common(Predicate p, methodOop method, CompLevel cur_level) { if (is_trivial(method)) return CompLevel_simple; CompLevel next_level = cur_level; int i = method->invocation_count(); int b = method->backedge_count(); + if (is_trivial(method)) { + next_level = CompLevel_simple; + } else { switch(cur_level) { case CompLevel_none: // If we were at full profile level, would we switch to full opt? if (common(p, method, CompLevel_full_profile) == CompLevel_full_optimization) { next_level = CompLevel_full_optimization;
*** 319,329 **** --- 316,327 ---- } } } break; } return next_level; + } + return MIN2(next_level, (CompLevel)TieredStopAtLevel); } // Determine if a method should be compiled with a normal entry point at a different level. CompLevel SimpleThresholdPolicy::call_event(methodOop method, CompLevel cur_level) { CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(),

src/share/vm/runtime/simpleThresholdPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File