Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: src/compiler/pipeline.cc

Issue 1928503002: [wasm] Fix turbolizer output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/compiler/pipeline.h ('K') | « src/compiler/pipeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« src/compiler/pipeline.h ('K') | « src/compiler/pipeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698