src/share/vm/runtime/compilationPolicy.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/compilationPolicy.cpp Wed Sep 17 15:59:02 2014
--- new/src/share/vm/runtime/compilationPolicy.cpp Wed Sep 17 15:59:02 2014
*** 225,236 ****
--- 225,237 ----
// BUT also make sure the method doesn't look like it was never executed.
// Set carry bit and reduce counter's value to min(count, CompileThreshold/2).
MethodCounters* mcs = m->method_counters();
assert(mcs != NULL, "MethodCounters cannot be NULL for profiling");
mcs->invocation_counter()->set_carry();
! mcs->backedge_counter()->set_carry();
+
! mcs->invocation_counter()->set_carry_and_reduce();
+ mcs->backedge_counter()->set_carry_and_reduce();
assert(!m->was_never_executed(), "don't reset to 0 -- could be mistaken for never-executed");
}
void NonTieredCompPolicy::reset_counter_for_back_branch_event(methodHandle m) {
*** 242,254 ****
--- 243,255 ----
InvocationCounter* b = mcs->backedge_counter();
// Don't set invocation_counter's value too low otherwise the method will
// look like immature (ic < ~5300) which prevents the inlining based on
// the type profiling.
! i->set(i->state(), CompileThreshold);
! i->set_count(CompileThreshold);
// Don't reset counter too low - it is used to check if OSR method is ready.
! b->set(b->state(), CompileThreshold / 2);
! b->set_count(CompileThreshold / 2);
}
//
// CounterDecay
//
*** 311,321 ****
--- 312,322 ----
mcs = sd->method()->method_counters();
if (mcs != NULL) {
c = mcs->invocation_counter();
if (is_osr) {
// It was an OSR method, so bump the count higher.
! c->set(c->state(), CompileThreshold);
! c->set_count(CompileThreshold);
} else {
c->reset();
}
mcs->backedge_counter()->reset();
}
*** 332,343 ****
--- 333,344 ----
}
void NonTieredCompPolicy::disable_compilation(Method* method) {
MethodCounters* mcs = method->method_counters();
if (mcs != NULL) {
! mcs->invocation_counter()->set_state(InvocationCounter::wait_for_nothing);
! mcs->backedge_counter()->set_state(InvocationCounter::wait_for_nothing);
! mcs->invocation_counter()->reset();
! mcs->backedge_counter()->reset();
}
}
CompileTask* NonTieredCompPolicy::select_task(CompileQueue* compile_queue) {
return compile_queue->first();
src/share/vm/runtime/compilationPolicy.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File