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

Side by Side Diff: Source/devtools/front_end/profiler/HeapSnapshotView.js

Issue 352603003: DevTools: Nuke Dominators view from heap profiler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 this._constructorsDataGrid.show(this._constructorsView.element); 72 this._constructorsDataGrid.show(this._constructorsView.element);
73 this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.Sel ectedNode, this._selectionChanged, this); 73 this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.Sel ectedNode, this._selectionChanged, this);
74 74
75 this._diffView = new WebInspector.VBox(); 75 this._diffView = new WebInspector.VBox();
76 this._diffView.setMinimumSize(50, 25); 76 this._diffView.setMinimumSize(50, 25);
77 77
78 this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(dataDisplayDe legate); 78 this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(dataDisplayDe legate);
79 this._diffDataGrid.show(this._diffView.element); 79 this._diffDataGrid.show(this._diffView.element);
80 this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNod e, this._selectionChanged, this); 80 this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNod e, this._selectionChanged, this);
81 81
82 this._dominatorView = new WebInspector.VBox();
83 this._dominatorView.setMinimumSize(50, 25);
84 this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid(da taDisplayDelegate);
85 this._dominatorDataGrid.show(this._dominatorView.element);
86 this._dominatorDataGrid.addEventListener(WebInspector.DataGrid.Events.Select edNode, this._selectionChanged, this);
87
88 if (profile._hasAllocationStacks) { 82 if (profile._hasAllocationStacks) {
89 this._allocationView = new WebInspector.VBox(); 83 this._allocationView = new WebInspector.VBox();
90 this._allocationView.setMinimumSize(50, 25); 84 this._allocationView.setMinimumSize(50, 25);
91 this._allocationDataGrid = new WebInspector.AllocationDataGrid(dataDispl ayDelegate); 85 this._allocationDataGrid = new WebInspector.AllocationDataGrid(dataDispl ayDelegate);
92 this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.S electedNode, this._onSelectAllocationNode, this); 86 this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.S electedNode, this._onSelectAllocationNode, this);
93 this._allocationDataGrid.show(this._allocationView.element); 87 this._allocationDataGrid.show(this._allocationView.element);
94 88
95 this._allocationStackView = new WebInspector.HeapAllocationStackView(); 89 this._allocationStackView = new WebInspector.HeapAllocationStackView();
96 this._allocationStackView.setMinimumSize(50, 25); 90 this._allocationStackView.setMinimumSize(50, 25);
97 91
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(d ataDisplayDelegate); 125 this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(d ataDisplayDelegate);
132 this._retainmentDataGrid.show(this._retainmentView.element); 126 this._retainmentDataGrid.show(this._retainmentView.element);
133 this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Selec tedNode, this._inspectedObjectChanged, this); 127 this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Selec tedNode, this._inspectedObjectChanged, this);
134 this._retainmentDataGrid.reset(); 128 this._retainmentDataGrid.reset();
135 129
136 this._perspectives = []; 130 this._perspectives = [];
137 this._perspectives.push(new WebInspector.HeapSnapshotView.SummaryPerspective ()); 131 this._perspectives.push(new WebInspector.HeapSnapshotView.SummaryPerspective ());
138 if (profile.profileType() !== WebInspector.ProfileTypeRegistry.instance.trac kingHeapSnapshotProfileType) 132 if (profile.profileType() !== WebInspector.ProfileTypeRegistry.instance.trac kingHeapSnapshotProfileType)
139 this._perspectives.push(new WebInspector.HeapSnapshotView.ComparisonPers pective()); 133 this._perspectives.push(new WebInspector.HeapSnapshotView.ComparisonPers pective());
140 this._perspectives.push(new WebInspector.HeapSnapshotView.ContainmentPerspec tive()); 134 this._perspectives.push(new WebInspector.HeapSnapshotView.ContainmentPerspec tive());
141 if (WebInspector.settings.showAdvancedHeapSnapshotProperties.get())
142 this._perspectives.push(new WebInspector.HeapSnapshotView.DominatorPersp ective());
143 if (this._allocationView) 135 if (this._allocationView)
144 this._perspectives.push(new WebInspector.HeapSnapshotView.AllocationPers pective()); 136 this._perspectives.push(new WebInspector.HeapSnapshotView.AllocationPers pective());
145 if (WebInspector.experimentsSettings.heapSnapshotStatistics.isEnabled()) 137 if (WebInspector.experimentsSettings.heapSnapshotStatistics.isEnabled())
146 this._perspectives.push(new WebInspector.HeapSnapshotView.StatisticsPers pective()); 138 this._perspectives.push(new WebInspector.HeapSnapshotView.StatisticsPers pective());
147 139
148 this._perspectiveSelect = new WebInspector.StatusBarComboBox(this._onSelecte dPerspectiveChanged.bind(this)); 140 this._perspectiveSelect = new WebInspector.StatusBarComboBox(this._onSelecte dPerspectiveChanged.bind(this));
149 for (var i = 0; i < this._perspectives.length; ++i) 141 for (var i = 0; i < this._perspectives.length; ++i)
150 this._perspectiveSelect.createOption(this._perspectives[i].title()); 142 this._perspectiveSelect.createOption(this._perspectives[i].title());
151 143
152 this._profile = profile; 144 this._profile = profile;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 { 353 {
362 return heapSnapshotView._containmentDataGrid; 354 return heapSnapshotView._containmentDataGrid;
363 }, 355 },
364 __proto__: WebInspector.HeapSnapshotView.Perspective.prototype 356 __proto__: WebInspector.HeapSnapshotView.Perspective.prototype
365 } 357 }
366 358
367 /** 359 /**
368 * @constructor 360 * @constructor
369 * @extends {WebInspector.HeapSnapshotView.Perspective} 361 * @extends {WebInspector.HeapSnapshotView.Perspective}
370 */ 362 */
371 WebInspector.HeapSnapshotView.DominatorPerspective = function()
372 {
373 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString( "Dominators"));
374 }
375
376 WebInspector.HeapSnapshotView.DominatorPerspective.prototype = {
377 /**
378 * @override
379 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView
380 */
381 activate: function(heapSnapshotView)
382 {
383 heapSnapshotView._dominatorView.show(heapSnapshotView._splitView.mainEle ment());
384 heapSnapshotView._objectDetailsView.show(heapSnapshotView._splitView.sid ebarElement());
385 heapSnapshotView._splitView.show(heapSnapshotView.element);
386 },
387
388 /**
389 * @override
390 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView
391 * @return {?WebInspector.DataGrid}
392 */
393 masterGrid: function(heapSnapshotView)
394 {
395 return heapSnapshotView._dominatorDataGrid;
396 },
397
398 __proto__: WebInspector.HeapSnapshotView.Perspective.prototype
399 }
400
401 /**
402 * @constructor
403 * @extends {WebInspector.HeapSnapshotView.Perspective}
404 */
405 WebInspector.HeapSnapshotView.AllocationPerspective = function() 363 WebInspector.HeapSnapshotView.AllocationPerspective = function()
406 { 364 {
407 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString( "Allocation")); 365 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString( "Allocation"));
408 this._allocationSplitView = new WebInspector.SplitView(false, true, "heapSna pshotAllocationSplitViewState", 200, 200); 366 this._allocationSplitView = new WebInspector.SplitView(false, true, "heapSna pshotAllocationSplitViewState", 200, 200);
409 367
410 var resizer = document.createElementWithClass("div", "heap-snapshot-view-res izer"); 368 var resizer = document.createElementWithClass("div", "heap-snapshot-view-res izer");
411 var title = resizer.createChild("div", "title").createChild("span"); 369 var title = resizer.createChild("div", "title").createChild("span");
412 title.textContent = WebInspector.UIString("Live objects"); 370 title.textContent = WebInspector.UIString("Live objects");
413 this._allocationSplitView.hideDefaultResizer(); 371 this._allocationSplitView.hideDefaultResizer();
414 this._allocationSplitView.installResizer(resizer); 372 this._allocationSplitView.installResizer(resizer);
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 urlElement = this._linkifier.linkifyRawLocation(rawLocation) ; 2241 urlElement = this._linkifier.linkifyRawLocation(rawLocation) ;
2284 if (!urlElement) 2242 if (!urlElement)
2285 urlElement = this._linkifier.linkifyLocation(this._target, f rame.scriptName, frame.line - 1, frame.column - 1); 2243 urlElement = this._linkifier.linkifyLocation(this._target, f rame.scriptName, frame.line - 1, frame.column - 1);
2286 frameDiv.appendChild(urlElement); 2244 frameDiv.appendChild(urlElement);
2287 } 2245 }
2288 } 2246 }
2289 }, 2247 },
2290 2248
2291 __proto__: WebInspector.View.prototype 2249 __proto__: WebInspector.View.prototype
2292 } 2250 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotProxy.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698