# HG changeset patch # User Doug Simon # Date 1452293100 -3600 # Node ID 9c0966b935a912e9a9af7a1bd0864151752e644c # Parent 94b7354ef0e09936321e51839145c392f05d762c converted select_task_blocking_aware into select_task_helper (GRAAL-1387) diff -r 94b7354ef0e0 -r 9c0966b935a9 src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp Fri Jan 08 22:24:51 2016 +0100 +++ b/src/share/vm/compiler/compileBroker.cpp Fri Jan 08 23:45:00 2016 +0100 @@ -1745,9 +1745,6 @@ } if (state == _thread_blocked) { if (++consecutively_blocked == BLOCKING_JVMCI_COMPILATION_WAIT_TO_UNBLOCK_ATTEMPTS) { - if (_compilation_log != NULL) { - _compilation_log->log_failure(thread, task, "wait for blocking compilation timed out", NULL); - } if (PrintCompilation) { task->print_compilation(tty, "wait for blocking compilation timed out"); } diff -r 94b7354ef0e0 -r 9c0966b935a9 src/share/vm/runtime/compilationPolicy.cpp --- a/src/share/vm/runtime/compilationPolicy.cpp Fri Jan 08 22:24:51 2016 +0100 +++ b/src/share/vm/runtime/compilationPolicy.cpp Fri Jan 08 23:45:00 2016 +0100 @@ -160,18 +160,25 @@ return !delay_compilation_during_startup() && CompileBroker::should_compile_new_jobs(); } +CompileTask* CompilationPolicy::select_task_helper(CompileQueue* compile_queue) { #ifdef COMPILERJVMCI -CompileTask* CompilationPolicy::select_task_blocking_aware(CompileQueue* compile_queue) { if (!BackgroundCompilation) { + /* + * 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. + */ for (CompileTask* task = compile_queue->first(); task != NULL; task = task->next()) { if (task->is_blocking()) { return task; } } } +#endif return compile_queue->first(); } -#endif #ifndef PRODUCT void CompilationPolicy::print_time() { @@ -353,11 +360,7 @@ } CompileTask* NonTieredCompPolicy::select_task(CompileQueue* compile_queue) { -#ifdef COMPILERJVMCI - return select_task_blocking_aware(compile_queue); -#else - return compile_queue->first(); -#endif + return select_task_helper(compile_queue); } bool NonTieredCompPolicy::is_mature(Method* method) { diff -r 94b7354ef0e0 -r 9c0966b935a9 src/share/vm/runtime/compilationPolicy.hpp --- a/src/share/vm/runtime/compilationPolicy.hpp Fri Jan 08 22:24:51 2016 +0100 +++ b/src/share/vm/runtime/compilationPolicy.hpp Fri Jan 08 23:45:00 2016 +0100 @@ -58,21 +58,7 @@ static void set_policy(CompilationPolicy* policy) { _policy = policy; } static CompilationPolicy* policy() { return _policy; } -#ifdef COMPILERJVMCI - /** - * If in blocking compilation mode and the JVMCI compiler is in use, - * this method selects a blocking task (if any) before a non-blocking - * task. 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. - * - * @return the first non-blocking task in compile_queue if there is one otherwise - * the first task in compile_queue - */ - static CompileTask* select_task_blocking_aware(CompileQueue* compile_queue); -#endif + static CompileTask* select_task_helper(CompileQueue* compile_queue); // Profiling elapsedTimer* accumulated_time() { return &_accumulated_time; } diff -r 94b7354ef0e0 -r 9c0966b935a9 src/share/vm/runtime/simpleThresholdPolicy.cpp --- a/src/share/vm/runtime/simpleThresholdPolicy.cpp Fri Jan 08 22:24:51 2016 +0100 +++ b/src/share/vm/runtime/simpleThresholdPolicy.cpp Fri Jan 08 23:45:00 2016 +0100 @@ -168,11 +168,7 @@ // Called with the queue locked and with at least one element CompileTask* SimpleThresholdPolicy::select_task(CompileQueue* compile_queue) { -#ifdef COMPILERJVMCI - return select_task_blocking_aware(compile_queue); -#else - return compile_queue->first(); -#endif + return select_task_helper(compile_queue); } void SimpleThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {