src/share/vm/compiler/compileBroker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/compiler/compileBroker.cpp	Thu Apr 14 14:23:41 2016
--- new/src/share/vm/compiler/compileBroker.cpp	Thu Apr 14 14:23:41 2016

*** 167,176 **** --- 167,178 ---- long CompileBroker::_peak_compilation_time = 0; CompileQueue* CompileBroker::_c2_compile_queue = NULL; CompileQueue* CompileBroker::_c1_compile_queue = NULL; + + class CompilationLog : public StringEventLog { public: CompilationLog() : StringEventLog("Compilation events") { }
*** 842,852 **** --- 844,854 ---- void CompileBroker::compile_method_base(const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, ! const char* comment, ! CompileTask::CompileReason compile_reason, bool blocking, Thread* thread) { guarantee(!method->is_abstract(), "cannot compile abstract methods"); assert(method->method_holder()->is_instance_klass(), "sanity check");
*** 858,868 **** --- 860,870 ---- tty->print("request: "); method->print_short_name(tty); if (osr_bci != InvocationEntryBci) { tty->print(" osr_bci: %d", osr_bci); } ! tty->print(" level: %d comment: %s count: %d", comp_level, comment, hot_count); ! tty->print(" level: %d comment: %s count: %d", comp_level, CompileTask::reason_name(compile_reason), hot_count); if (!hot_method.is_null()) { tty->print(" hot: "); if (hot_method() != method()) { hot_method->print_short_name(tty); } else {
*** 1022,1032 **** --- 1024,1034 ---- // these bits, and their updating (here and elsewhere) under a // common lock. task = create_compile_task(queue, compile_id, method, osr_bci, comp_level, ! hot_method, hot_count, comment, ! hot_method, hot_count, compile_reason, blocking); } if (blocking) { wait_for_completion(task);
*** 1034,1060 **** --- 1036,1064 ---- } 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) { + CompileTask::CompileReason compile_reason, + Thread* THREAD) { // do nothing if compilebroker is not available if (!_initialized) { return NULL; } AbstractCompiler *comp = CompileBroker::compiler(comp_level); assert(comp != NULL, "Ensure we don't compile before compilebroker init"); DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, comp); ! nmethod* nm = CompileBroker::compile_method(method, osr_bci, comp_level, hot_method, hot_count, comment, directive, THREAD); ! nmethod* nm = CompileBroker::compile_method(method, osr_bci, comp_level, hot_method, hot_count, compile_reason, directive, THREAD); DirectivesStack::release(directive); return nm; } nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, ! const char* comment, DirectiveSet* directive, ! CompileTask::CompileReason compile_reason, + DirectiveSet* directive, 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");
*** 1176,1186 **** --- 1180,1190 ---- if (!should_compile_new_jobs()) { CompilationPolicy::policy()->delay_compilation(method()); return NULL; } bool is_blocking = !directive->BackgroundCompilationOption || CompileTheWorld || ReplayCompiles; ! compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, is_blocking, THREAD); ! compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, compile_reason, is_blocking, THREAD); } // return requested nmethod // We accept a higher level osr method if (osr_bci == InvocationEntryBci) {
*** 1335,1349 **** --- 1339,1353 ---- const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, ! const char* comment, ! CompileTask::CompileReason compile_reason, bool blocking) { CompileTask* new_task = CompileTask::allocate(); new_task->initialize(compile_id, method, osr_bci, comp_level, ! hot_method, hot_count, comment, ! hot_method, hot_count, compile_reason, blocking); queue->add(new_task); return new_task; }

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