src/share/vm/compiler/compileBroker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/compiler/compileBroker.cpp

src/share/vm/compiler/compileBroker.cpp

Print this page
rev 10291 : 8150646: Add support for blocking compiles though whitebox API
Summary: Better testing
Reviewed-by:

*** 836,845 **** --- 836,846 ---- int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, const char* comment, + bool blocking, Thread* thread) { // do nothing if compiler thread(s) is not available if (!_initialized) { return; }
*** 914,924 **** method->get_method_counters(thread); } // Outputs from the following MutexLocker block: CompileTask* task = NULL; - bool blocking = false; CompileQueue* queue = compile_queue(comp_level); // Acquire our lock. { MutexLocker locker(MethodCompileQueue_lock, thread); --- 915,924 ----
*** 945,955 **** // The compilation falls outside the allowed range. return; } // Should this thread wait for completion of the compile? ! blocking = is_compile_blocking(); #if INCLUDE_JVMCI if (UseJVMCICompiler) { if (blocking) { // Don't allow blocking compiles for requests triggered by JVMCI. --- 945,955 ---- // The compilation falls outside the allowed range. return; } // Should this thread wait for completion of the compile? ! blocking |= is_compile_blocking(); #if INCLUDE_JVMCI if (UseJVMCICompiler) { if (blocking) { // Don't allow blocking compiles for requests triggered by JVMCI.
*** 1036,1046 **** nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, ! const char* comment, Thread* THREAD) { // make sure arguments make sense assert(method->method_holder()->is_instance_klass(), "not an instance method"); assert(osr_bci == InvocationEntryBci || (0 <= osr_bci && osr_bci < method->code_size()), "bci out of range"); assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native()), "cannot compile abstract/native methods"); assert(!method->method_holder()->is_not_initialized(), "method holder must be initialized"); --- 1036,1046 ---- nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, ! const char* comment, bool blocking, Thread* THREAD) { // make sure arguments make sense assert(method->method_holder()->is_instance_klass(), "not an instance method"); assert(osr_bci == InvocationEntryBci || (0 <= osr_bci && osr_bci < method->code_size()), "bci out of range"); assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native()), "cannot compile abstract/native methods"); assert(!method->method_holder()->is_not_initialized(), "method holder must be initialized");
*** 1158,1168 **** // fail out now so blocking compiles dont hang the java thread if (!should_compile_new_jobs()) { CompilationPolicy::policy()->delay_compilation(method()); return NULL; } ! compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, THREAD); } // return requested nmethod // We accept a higher level osr method if (osr_bci == InvocationEntryBci) { --- 1158,1168 ---- // fail out now so blocking compiles dont hang the java thread if (!should_compile_new_jobs()) { CompilationPolicy::policy()->delay_compilation(method()); return NULL; } ! compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, blocking, THREAD); } // return requested nmethod // We accept a higher level osr method if (osr_bci == InvocationEntryBci) {
src/share/vm/compiler/compileBroker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File