Chromium Code Reviews| Index: src/compiler/pipeline.cc |
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
| index f4d898f8a5457af7357f2e56a7c15429de5f9a38..ce03e42bfe83856e5b660befc03667504fb6334e 100644 |
| --- a/src/compiler/pipeline.cc |
| +++ b/src/compiler/pipeline.cc |
| @@ -602,6 +602,18 @@ PipelineWasmCompilationJob::CreateGraphImpl() { |
| PipelineWasmCompilationJob::Status |
| PipelineWasmCompilationJob::OptimizeGraphImpl() { |
| + if (FLAG_trace_turbo) { |
| + FILE* json_file = OpenVisualizerLogFile(info(), nullptr, "json", "w+"); |
| + if (json_file != nullptr) { |
| + OFStream json_of(json_file); |
| + json_of << "{\"function\":\"" << info()->GetDebugName().get() |
| + << "\", \"source\":\"\",\n\"phases\":["; |
| + fclose(json_file); |
| + } |
| + } |
| + |
| + pipeline_.RunPrintAndVerify("Machine", true); |
| + |
| if (!pipeline_.ScheduleAndSelectInstructions(&linkage_)) return FAILED; |
| return SUCCEEDED; |
| } |
| @@ -1453,6 +1465,15 @@ Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
| Pipeline pipeline(&data); |
| if (data.schedule() == nullptr) { |
| + if (FLAG_trace_turbo) { |
|
ahaas
2016/04/27 14:45:22
Why do you write the header only if there is no sc
Clemens Hammacher
2016/04/27 14:58:55
Because also the RunPrintAndVerity is only execute
|
| + FILE* json_file = OpenVisualizerLogFile(info, nullptr, "json", "w+"); |
| + if (json_file != nullptr) { |
| + OFStream json_of(json_file); |
| + json_of << "{\"function\":\"" << info->GetDebugName().get() |
| + << "\", \"source\":\"\",\n\"phases\":["; |
| + fclose(json_file); |
| + } |
| + } |
| // TODO(rossberg): Should this really be untyped? |
| pipeline.RunPrintAndVerify("Machine", true); |
| } |