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

Unified Diff: tools/turbolizer/graph-view.js

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 | « test/cctest/compiler/test-osr.cc ('k') | tools/turbolizer/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/turbolizer/graph-view.js
diff --git a/tools/turbolizer/graph-view.js b/tools/turbolizer/graph-view.js
index 5c802e1b56fd1ef355b13dec939e3eef895a1857..1863e1a7014cb8adfdf15e822e36ff369ff8a8c7 100644
--- a/tools/turbolizer/graph-view.js
+++ b/tools/turbolizer/graph-view.js
@@ -125,6 +125,7 @@ class GraphView extends View {
d3.select("#upload").on("click", partial(this.uploadAction, graph));
d3.select("#layout").on("click", partial(this.layoutAction, graph));
d3.select("#show-all").on("click", partial(this.showAllAction, graph));
+ d3.select("#hide-dead").on("click", partial(this.hideDeadAction, graph));
d3.select("#hide-unselected").on("click", partial(this.hideUnselectedAction, graph));
d3.select("#hide-selected").on("click", partial(this.hideSelectedAction, graph));
d3.select("#zoom-selection").on("click", partial(this.zoomSelectionAction, graph));
@@ -463,6 +464,11 @@ class GraphView extends View {
graph.viewWholeGraph();
}
+ hideDeadAction(graph) {
+ graph.nodes.filter(function(n) { if (!n.live) n.visible = false; })
+ graph.updateGraphVisibility();
+ }
+
hideUnselectedAction(graph) {
var unselected = graph.visibleNodes.filter(function(n) {
return !this.classList.contains("selected");
@@ -725,6 +731,8 @@ class GraphView extends View {
.append("g");
newGs.classed("control", function(n) { return n.isControl(); })
+ .classed("live", function(n) { return n.isLive(); })
+ .classed("dead", function(n) { return !n.isLive(); })
.classed("javascript", function(n) { return n.isJavaScript(); })
.classed("input", function(n) { return n.isInput(); })
.classed("simplified", function(n) { return n.isSimplified(); })
« no previous file with comments | « test/cctest/compiler/test-osr.cc ('k') | tools/turbolizer/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698