src/share/vm/runtime/advancedThresholdPolicy.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/advancedThresholdPolicy.cpp Wed Mar 2 13:19:44 2016
--- new/src/share/vm/runtime/advancedThresholdPolicy.cpp Wed Mar 2 13:19:44 2016
*** 162,174 ****
--- 162,172 ----
return false;
}
// Called with the queue locked and with at least one element
CompileTask* AdvancedThresholdPolicy::select_task(CompileQueue* compile_queue) {
#if INCLUDE_JVMCI
CompileTask *max_blocking_task = NULL;
#endif
CompileTask *max_task = NULL;
Method* max_method = NULL;
jlong t = os::javaTimeMillis();
// Iterate through the queue and find a method with a maximum rate.
for (CompileTask* task = compile_queue->first(); task != NULL;) {
*** 178,188 ****
--- 176,187 ----
if (max_task == NULL) {
max_task = task;
max_method = method;
} else {
// If a method has been stale for some time, remove it from the queue.
if (is_stale(t, TieredCompileTaskTimeout, method) && !is_old(method)) {
+ // Blocking tasks don't become stale
+ if (!task->is_blocking() && is_stale(t, TieredCompileTaskTimeout, method) && !is_old(method)) {
if (PrintTieredEvents) {
print_event(REMOVE_FROM_QUEUE, method, method, task->osr_bci(), (CompLevel)task->comp_level());
}
task->log_task_dequeued("stale");
compile_queue->remove_and_mark_stale(task);
*** 195,227 ****
--- 194,222 ----
if (compare_methods(method, max_method)) {
max_task = task;
max_method = method;
}
}
#if INCLUDE_JVMCI
- if (UseJVMCICompiler && task->is_blocking()) {
+
if (max_blocking_task == NULL || compare_methods(method, max_blocking_task->method())) {
max_blocking_task = task;
}
}
#endif
+
task = next_task;
}
#if INCLUDE_JVMCI
if (UseJVMCICompiler) {
if (max_blocking_task != NULL) {
// In blocking compilation mode, the CompileBroker will make
// compilations submitted by a JVMCI compiler thread non-blocking. These
// compilations should be scheduled after all blocking compilations
// to service non-compiler related compilations sooner and reduce the
// chance of such compilations timing out.
max_task = max_blocking_task;
max_method = max_task->method();
}
}
#endif
if (max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile
&& is_method_profiled(max_method)) {
max_task->set_comp_level(CompLevel_limited_profile);
if (PrintTieredEvents) {
src/share/vm/runtime/advancedThresholdPolicy.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File