Commit 50b7ca55 authored by Sven Panne's avatar Sven Panne

Improved --trace-opt output a bit.

This ensures that we always have a kind of "brace" around the actual compilation
with --trace-opt. Previously this was coupled to --trace-hydrogen for
Crankshaft, and there was no output at the start of the compilation for
TurboFan.

Removed redundant "[completed...]" output: Whenever the compilation was
successful, we have already printed "[optimizing...took...]".

Output total TurboFanning time with --trace-opt, too (basically as graph
building time, this is rather arbitrary).

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/819613002

Cr-Commit-Position: refs/heads/master@{#25900}
parent 0c96a8b1
......@@ -415,6 +415,12 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
// Check the whitelist for TurboFan.
if ((FLAG_turbo_asm && info()->shared_info()->asm_function()) ||
info()->closure()->PassesFilter(FLAG_turbo_filter)) {
if (FLAG_trace_opt) {
OFStream os(stdout);
os << "[compiling method " << Brief(*info()->closure())
<< " using TurboFan]" << std::endl;
}
Timer t(this, &time_taken_to_create_graph_);
compiler::Pipeline pipeline(info());
pipeline.GenerateCode();
if (!info()->code().is_null()) {
......@@ -422,10 +428,13 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
}
}
if (FLAG_trace_opt) {
OFStream os(stdout);
os << "[compiling method " << Brief(*info()->closure())
<< " using Crankshaft]" << std::endl;
}
if (FLAG_trace_hydrogen) {
Handle<String> name = info()->function()->debug_name();
PrintF("-----------------------------------------------------------\n");
PrintF("Compiling method %s using hydrogen\n", name->ToCString().get());
isolate()->GetHTracer()->TraceCompilation(info());
}
......@@ -871,11 +880,6 @@ static bool GetOptimizedCodeNow(CompilationInfo* info) {
InsertCodeIntoOptimizedCodeMap(info);
RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info,
info->shared_info());
if (FLAG_trace_opt) {
PrintF("[completed optimizing ");
info->closure()->ShortPrint();
PrintF("]\n");
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment