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

src/share/vm/runtime/simpleThresholdPolicy.cpp

Print this page
rev 7045 : 7115356: assert(!m->was_never_executed()) failed
Summary: Race when asserting on invocation counters
Reviewed-by:

*** 144,170 **** set_c1_count(MAX2(count / 3, 1)); set_c2_count(MAX2(count - c1_count(), 1)); FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count()); } - void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) { - if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) { - counter->set_carry_flag(); - } - } - // Set carry flags on the counters if necessary void SimpleThresholdPolicy::handle_counter_overflow(Method* method) { MethodCounters *mcs = method->method_counters(); if (mcs != NULL) { ! set_carry_if_necessary(mcs->invocation_counter()); ! set_carry_if_necessary(mcs->backedge_counter()); } MethodData* mdo = method->method_data(); if (mdo != NULL) { ! set_carry_if_necessary(mdo->invocation_counter()); ! set_carry_if_necessary(mdo->backedge_counter()); } } // Called with the queue locked and with at least one element CompileTask* SimpleThresholdPolicy::select_task(CompileQueue* compile_queue) { --- 144,164 ---- set_c1_count(MAX2(count / 3, 1)); set_c2_count(MAX2(count - c1_count(), 1)); FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count()); } // Set carry flags on the counters if necessary void SimpleThresholdPolicy::handle_counter_overflow(Method* method) { MethodCounters *mcs = method->method_counters(); if (mcs != NULL) { ! mcs->invocation_counter()->set_carry_if_necessary(); ! mcs->backedge_counter()->set_carry_if_necessary(); } MethodData* mdo = method->method_data(); if (mdo != NULL) { ! mdo->invocation_counter()->set_carry_if_necessary(); ! mdo->backedge_counter()->set_carry_if_necessary(); } } // Called with the queue locked and with at least one element CompileTask* SimpleThresholdPolicy::select_task(CompileQueue* compile_queue) {
src/share/vm/runtime/simpleThresholdPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File