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

Unified Diff: src/compiler/graph-visualizer.cc

Issue 2226293002: [turbolizer] Visualize also the dead nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@t-p2
Patch Set: Created 4 years, 4 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
« no previous file with comments | « src/compiler/graph-replay.cc ('k') | src/compiler/osr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-visualizer.cc
diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc
index dc83ccf5db632261ced48f149058f4cee8ff3eb7..ca5b8e8e4e47d4a72d9e0d55b590cf17d15abb96 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -113,10 +113,14 @@ class JSONGraphNodeWriter {
public:
JSONGraphNodeWriter(std::ostream& os, Zone* zone, const Graph* graph,
const SourcePositionTable* positions)
- : os_(os), all_(zone, graph), positions_(positions), first_node_(true) {}
+ : os_(os),
+ all_(zone, graph, false),
+ live_(zone, graph, true),
+ positions_(positions),
+ first_node_(true) {}
void Print() {
- for (Node* const node : all_.live) PrintNode(node);
+ for (Node* const node : all_.reachable) PrintNode(node);
os_ << "\n";
}
@@ -133,6 +137,7 @@ class JSONGraphNodeWriter {
os_ << "{\"id\":" << SafeId(node) << ",\"label\":\"" << Escaped(label, "\"")
<< "\""
<< ",\"title\":\"" << Escaped(title, "\"") << "\""
+ << ",\"live\": " << (live_.IsLive(node) ? "true" : "false")
<< ",\"properties\":\"" << Escaped(properties, "\"") << "\"";
IrOpcode::Value opcode = node->opcode();
if (IrOpcode::IsPhiOpcode(opcode)) {
@@ -173,6 +178,7 @@ class JSONGraphNodeWriter {
private:
std::ostream& os_;
AllNodes all_;
+ AllNodes live_;
const SourcePositionTable* positions_;
bool first_node_;
@@ -183,10 +189,10 @@ class JSONGraphNodeWriter {
class JSONGraphEdgeWriter {
public:
JSONGraphEdgeWriter(std::ostream& os, Zone* zone, const Graph* graph)
- : os_(os), all_(zone, graph), first_edge_(true) {}
+ : os_(os), all_(zone, graph, false), first_edge_(true) {}
void Print() {
- for (Node* const node : all_.live) PrintEdges(node);
+ for (Node* const node : all_.reachable) PrintEdges(node);
os_ << "\n";
}
« no previous file with comments | « src/compiler/graph-replay.cc ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698