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

Side by Side Diff: tools/turbolizer/turbo-visualizer.js

Issue 2234523002: [turbolizer] Fix selection bugs and performance problems (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 unified diff | Download patch
« no previous file with comments | « tools/turbolizer/text-view.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 document.onload = (function(d3){ 5 document.onload = (function(d3){
6 "use strict"; 6 "use strict";
7 var jsonObj; 7 var jsonObj;
8 var sourceExpandClassList = document.getElementById(SOURCE_EXPAND_ID).classLis t; 8 var sourceExpandClassList = document.getElementById(SOURCE_EXPAND_ID).classLis t;
9 var sourceCollapseClassList = document.getElementById(SOURCE_COLLAPSE_ID).clas sList; 9 var sourceCollapseClassList = document.getElementById(SOURCE_COLLAPSE_ID).clas sList;
10 var sourceExpanded = sourceCollapseClassList.contains(COLLAPSE_PANE_BUTTON_VIS IBLE); 10 var sourceExpanded = sourceCollapseClassList.contains(COLLAPSE_PANE_BUTTON_VIS IBLE);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 filereader.onload = function(){ 161 filereader.onload = function(){
162 var txtRes = filereader.result; 162 var txtRes = filereader.result;
163 // If the JSON isn't properly terminated, assume compiler crashed and 163 // If the JSON isn't properly terminated, assume compiler crashed and
164 // add best-guess empty termination 164 // add best-guess empty termination
165 if (txtRes[txtRes.length-2] == ',') { 165 if (txtRes[txtRes.length-2] == ',') {
166 txtRes += '{"name":"disassembly","type":"disassembly","data":""}]}'; 166 txtRes += '{"name":"disassembly","type":"disassembly","data":""}]}';
167 } 167 }
168 try{ 168 try{
169 jsonObj = JSON.parse(txtRes); 169 jsonObj = JSON.parse(txtRes);
170 170
171 hideCurrentPhase();
172
171 sourceView.initializeCode(jsonObj.source, jsonObj.sourcePosition); 173 sourceView.initializeCode(jsonObj.source, jsonObj.sourcePosition);
172 disassemblyView.initializeCode(jsonObj.source, jsonObj.sourcePositio n); 174 disassemblyView.initializeCode(jsonObj.source, jsonObj.sourcePositio n);
173 schedule.setNodePositionMap(jsonObj.nodePositions); 175 schedule.setNodePositionMap(jsonObj.nodePositions);
174 176
175 var selectMenu = document.getElementById('display-selector'); 177 var selectMenu = document.getElementById('display-selector');
176 var disassemblyPhase = null; 178 var disassemblyPhase = null;
177 selectMenu.innerHTML = ''; 179 selectMenu.innerHTML = '';
178 for (var i = 0; i < jsonObj.phases.length; ++i) { 180 for (var i = 0; i < jsonObj.phases.length; ++i) {
179 var optionElement = document.createElement("option"); 181 var optionElement = document.createElement("option");
180 optionElement.text = jsonObj.phases[i].name; 182 optionElement.text = jsonObj.phases[i].name;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 empty = new EmptyView(EMPTY_PANE_ID, selectionBroker); 248 empty = new EmptyView(EMPTY_PANE_ID, selectionBroker);
247 249
248 initializeHandlers(graph); 250 initializeHandlers(graph);
249 251
250 setSourceExpanded(getLastExpandedState("source", true)); 252 setSourceExpanded(getLastExpandedState("source", true));
251 setDisassemblyExpanded(getLastExpandedState("disassembly", false)); 253 setDisassemblyExpanded(getLastExpandedState("disassembly", false));
252 254
253 displayPhaseView(empty, null); 255 displayPhaseView(empty, null);
254 fitPanesToParents(); 256 fitPanesToParents();
255 })(window.d3); 257 })(window.d3);
OLDNEW
« no previous file with comments | « tools/turbolizer/text-view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698