6953144: Tiered compilation

Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.

Reviewed-by: kvn, never, phh, twisti
This commit is contained in:
Igor Veresov 2010-09-03 17:51:07 -07:00
parent 6e78f6cb4b
commit 2c66a6c3fd
104 changed files with 7720 additions and 1701 deletions

View file

@ -430,29 +430,7 @@ bool SafepointSynchronize::is_cleanup_needed() {
return false;
}
jlong CounterDecay::_last_timestamp = 0;
static void do_method(methodOop m) {
m->invocation_counter()->decay();
}
void CounterDecay::decay() {
_last_timestamp = os::javaTimeMillis();
// This operation is going to be performed only at the end of a safepoint
// and hence GC's will not be going on, all Java mutators are suspended
// at this point and hence SystemDictionary_lock is also not needed.
assert(SafepointSynchronize::is_at_safepoint(), "can only be executed at a safepoint");
int nclasses = SystemDictionary::number_of_classes();
double classes_per_tick = nclasses * (CounterDecayMinIntervalLength * 1e-3 /
CounterHalfLifeTime);
for (int i = 0; i < classes_per_tick; i++) {
klassOop k = SystemDictionary::try_get_next_class();
if (k != NULL && k->klass_part()->oop_is_instance()) {
instanceKlass::cast(k)->methods_do(do_method);
}
}
}
// Various cleaning tasks that should be done periodically at safepoints
void SafepointSynchronize::do_cleanup_tasks() {
@ -465,10 +443,9 @@ void SafepointSynchronize::do_cleanup_tasks() {
TraceTime t2("updating inline caches", TraceSafepointCleanupTime);
InlineCacheBuffer::update_inline_caches();
}
if(UseCounterDecay && CounterDecay::is_decay_needed()) {
TraceTime t3("decaying counter", TraceSafepointCleanupTime);
CounterDecay::decay();
{
TraceTime t3("compilation policy safepoint handler", TraceSafepointCleanupTime);
CompilationPolicy::policy()->do_safepoint_work();
}
TraceTime t4("sweeping nmethods", TraceSafepointCleanupTime);