8059606: Enable per-method usage of CompileThresholdScaling (per-method compilation thresholds)

Changed interpreter and compilation policies to allow using CompileThresholdScaling on a per-method level

Reviewed-by: jrose, kvn
This commit is contained in:
Zoltan Majo 2015-01-21 10:51:35 +01:00
parent 3d814126c2
commit e559c17954
32 changed files with 293 additions and 157 deletions

View file

@ -412,15 +412,14 @@ MethodCounters* Method::build_method_counters(Method* m, TRAPS) {
}
methodHandle mh(m);
ClassLoaderData* loader_data = mh->method_holder()->class_loader_data();
MethodCounters* counters = MethodCounters::allocate(loader_data, THREAD);
MethodCounters* counters = MethodCounters::allocate(mh, THREAD);
if (HAS_PENDING_EXCEPTION) {
CompileBroker::log_metaspace_failure();
ClassLoaderDataGraph::set_metaspace_oom(true);
return NULL; // return the exception (which is cleared)
}
if (!mh->init_method_counters(counters)) {
MetadataFactory::free_metadata(loader_data, counters);
MetadataFactory::free_metadata(mh->method_holder()->class_loader_data(), counters);
}
return mh->method_counters();
}