| OLD | NEW |
| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 this._parentDataDisplayDelegate = dataDisplayDelegate; | 58 this._parentDataDisplayDelegate = dataDisplayDelegate; |
| 59 | 59 |
| 60 this._searchableView = new UI.SearchableView(this); | 60 this._searchableView = new UI.SearchableView(this); |
| 61 this._searchableView.show(this.element); | 61 this._searchableView.show(this.element); |
| 62 | 62 |
| 63 this._splitWidget = new UI.SplitWidget(false, true, 'heapSnapshotSplitViewSt
ate', 200, 200); | 63 this._splitWidget = new UI.SplitWidget(false, true, 'heapSnapshotSplitViewSt
ate', 200, 200); |
| 64 this._splitWidget.show(this._searchableView.element); | 64 this._splitWidget.show(this._searchableView.element); |
| 65 | 65 |
| 66 this._containmentDataGrid = new Profiler.HeapSnapshotContainmentDataGrid(thi
s); | 66 this._containmentDataGrid = new Profiler.HeapSnapshotContainmentDataGrid(thi
s); |
| 67 this._containmentDataGrid.addEventListener(UI.DataGrid.Events.SelectedNode,
this._selectionChanged, this); | 67 this._containmentDataGrid.addEventListener(DataGrid.DataGrid.Events.Selected
Node, this._selectionChanged, this); |
| 68 this._containmentWidget = this._containmentDataGrid.asWidget(); | 68 this._containmentWidget = this._containmentDataGrid.asWidget(); |
| 69 this._containmentWidget.setMinimumSize(50, 25); | 69 this._containmentWidget.setMinimumSize(50, 25); |
| 70 | 70 |
| 71 this._statisticsView = new Profiler.HeapSnapshotStatisticsView(); | 71 this._statisticsView = new Profiler.HeapSnapshotStatisticsView(); |
| 72 | 72 |
| 73 this._constructorsDataGrid = new Profiler.HeapSnapshotConstructorsDataGrid(t
his); | 73 this._constructorsDataGrid = new Profiler.HeapSnapshotConstructorsDataGrid(t
his); |
| 74 this._constructorsDataGrid.addEventListener(UI.DataGrid.Events.SelectedNode,
this._selectionChanged, this); | 74 this._constructorsDataGrid.addEventListener(DataGrid.DataGrid.Events.Selecte
dNode, this._selectionChanged, this); |
| 75 this._constructorsWidget = this._constructorsDataGrid.asWidget(); | 75 this._constructorsWidget = this._constructorsDataGrid.asWidget(); |
| 76 this._constructorsWidget.setMinimumSize(50, 25); | 76 this._constructorsWidget.setMinimumSize(50, 25); |
| 77 | 77 |
| 78 this._diffDataGrid = new Profiler.HeapSnapshotDiffDataGrid(this); | 78 this._diffDataGrid = new Profiler.HeapSnapshotDiffDataGrid(this); |
| 79 this._diffDataGrid.addEventListener(UI.DataGrid.Events.SelectedNode, this._s
electionChanged, this); | 79 this._diffDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, t
his._selectionChanged, this); |
| 80 this._diffWidget = this._diffDataGrid.asWidget(); | 80 this._diffWidget = this._diffDataGrid.asWidget(); |
| 81 this._diffWidget.setMinimumSize(50, 25); | 81 this._diffWidget.setMinimumSize(50, 25); |
| 82 | 82 |
| 83 if (isHeapTimeline && Common.moduleSetting('recordAllocationStacks').get())
{ | 83 if (isHeapTimeline && Common.moduleSetting('recordAllocationStacks').get())
{ |
| 84 this._allocationDataGrid = new Profiler.AllocationDataGrid(profile.target(
), this); | 84 this._allocationDataGrid = new Profiler.AllocationDataGrid(profile.target(
), this); |
| 85 this._allocationDataGrid.addEventListener(UI.DataGrid.Events.SelectedNode,
this._onSelectAllocationNode, this); | 85 this._allocationDataGrid.addEventListener( |
| 86 DataGrid.DataGrid.Events.SelectedNode, this._onSelectAllocationNode, t
his); |
| 86 this._allocationWidget = this._allocationDataGrid.asWidget(); | 87 this._allocationWidget = this._allocationDataGrid.asWidget(); |
| 87 this._allocationWidget.setMinimumSize(50, 25); | 88 this._allocationWidget.setMinimumSize(50, 25); |
| 88 | 89 |
| 89 this._allocationStackView = new Profiler.HeapAllocationStackView(profile.t
arget()); | 90 this._allocationStackView = new Profiler.HeapAllocationStackView(profile.t
arget()); |
| 90 this._allocationStackView.setMinimumSize(50, 25); | 91 this._allocationStackView.setMinimumSize(50, 25); |
| 91 | 92 |
| 92 this._tabbedPane = new UI.TabbedPane(); | 93 this._tabbedPane = new UI.TabbedPane(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 this._retainmentDataGrid = new Profiler.HeapSnapshotRetainmentDataGrid(this)
; | 96 this._retainmentDataGrid = new Profiler.HeapSnapshotRetainmentDataGrid(this)
; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 113 retainingPathsTitle.textContent = Common.UIString('Retainers'); | 114 retainingPathsTitle.textContent = Common.UIString('Retainers'); |
| 114 | 115 |
| 115 splitWidgetResizer = retainmentViewHeader; | 116 splitWidgetResizer = retainmentViewHeader; |
| 116 this._objectDetailsView = new UI.VBox(); | 117 this._objectDetailsView = new UI.VBox(); |
| 117 this._objectDetailsView.element.appendChild(retainmentViewHeader); | 118 this._objectDetailsView.element.appendChild(retainmentViewHeader); |
| 118 this._retainmentWidget.show(this._objectDetailsView.element); | 119 this._retainmentWidget.show(this._objectDetailsView.element); |
| 119 } | 120 } |
| 120 this._splitWidget.hideDefaultResizer(); | 121 this._splitWidget.hideDefaultResizer(); |
| 121 this._splitWidget.installResizer(splitWidgetResizer); | 122 this._splitWidget.installResizer(splitWidgetResizer); |
| 122 | 123 |
| 123 this._retainmentDataGrid.addEventListener(UI.DataGrid.Events.SelectedNode, t
his._inspectedObjectChanged, this); | 124 this._retainmentDataGrid.addEventListener( |
| 125 DataGrid.DataGrid.Events.SelectedNode, this._inspectedObjectChanged, thi
s); |
| 124 this._retainmentDataGrid.reset(); | 126 this._retainmentDataGrid.reset(); |
| 125 | 127 |
| 126 this._perspectives = []; | 128 this._perspectives = []; |
| 127 this._comparisonPerspective = new Profiler.HeapSnapshotView.ComparisonPerspe
ctive(); | 129 this._comparisonPerspective = new Profiler.HeapSnapshotView.ComparisonPerspe
ctive(); |
| 128 this._perspectives.push(new Profiler.HeapSnapshotView.SummaryPerspective()); | 130 this._perspectives.push(new Profiler.HeapSnapshotView.SummaryPerspective()); |
| 129 if (profile.profileType() !== Profiler.ProfileTypeRegistry.instance.tracking
HeapSnapshotProfileType) | 131 if (profile.profileType() !== Profiler.ProfileTypeRegistry.instance.tracking
HeapSnapshotProfileType) |
| 130 this._perspectives.push(this._comparisonPerspective); | 132 this._perspectives.push(this._comparisonPerspective); |
| 131 this._perspectives.push(new Profiler.HeapSnapshotView.ContainmentPerspective
()); | 133 this._perspectives.push(new Profiler.HeapSnapshotView.ContainmentPerspective
()); |
| 132 if (this._allocationWidget) | 134 if (this._allocationWidget) |
| 133 this._perspectives.push(new Profiler.HeapSnapshotView.AllocationPerspectiv
e()); | 135 this._perspectives.push(new Profiler.HeapSnapshotView.AllocationPerspectiv
e()); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 _selectionChanged(event) { | 447 _selectionChanged(event) { |
| 446 var selectedNode = /** @type {!Profiler.HeapSnapshotGridNode} */ (event.data
); | 448 var selectedNode = /** @type {!Profiler.HeapSnapshotGridNode} */ (event.data
); |
| 447 this._setSelectedNodeForDetailsView(selectedNode); | 449 this._setSelectedNodeForDetailsView(selectedNode); |
| 448 this._inspectedObjectChanged(event); | 450 this._inspectedObjectChanged(event); |
| 449 } | 451 } |
| 450 | 452 |
| 451 /** | 453 /** |
| 452 * @param {!Common.Event} event | 454 * @param {!Common.Event} event |
| 453 */ | 455 */ |
| 454 _onSelectAllocationNode(event) { | 456 _onSelectAllocationNode(event) { |
| 455 var selectedNode = /** @type {!UI.DataGridNode} */ (event.data); | 457 var selectedNode = /** @type {!DataGrid.DataGridNode} */ (event.data); |
| 456 this._constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId
()); | 458 this._constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId
()); |
| 457 this._setSelectedNodeForDetailsView(null); | 459 this._setSelectedNodeForDetailsView(null); |
| 458 } | 460 } |
| 459 | 461 |
| 460 /** | 462 /** |
| 461 * @param {!Common.Event} event | 463 * @param {!Common.Event} event |
| 462 */ | 464 */ |
| 463 _inspectedObjectChanged(event) { | 465 _inspectedObjectChanged(event) { |
| 464 var selectedNode = /** @type {!UI.DataGridNode} */ (event.data); | 466 var selectedNode = /** @type {!DataGrid.DataGridNode} */ (event.data); |
| 465 var target = this._profile.target(); | 467 var target = this._profile.target(); |
| 466 if (target && selectedNode instanceof Profiler.HeapSnapshotGenericObjectNode
) | 468 if (target && selectedNode instanceof Profiler.HeapSnapshotGenericObjectNode
) |
| 467 target.heapProfilerAgent().addInspectedHeapObject(String(selectedNode.snap
shotNodeId)); | 469 target.heapProfilerAgent().addInspectedHeapObject(String(selectedNode.snap
shotNodeId)); |
| 468 } | 470 } |
| 469 | 471 |
| 470 /** | 472 /** |
| 471 * @param {?Profiler.HeapSnapshotGridNode} nodeItem | 473 * @param {?Profiler.HeapSnapshotGridNode} nodeItem |
| 472 */ | 474 */ |
| 473 _setSelectedNodeForDetailsView(nodeItem) { | 475 _setSelectedNodeForDetailsView(nodeItem) { |
| 474 var dataSource = nodeItem && nodeItem.retainersDataSource(); | 476 var dataSource = nodeItem && nodeItem.retainersDataSource(); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 heapSnapshotView._allocationWidget.detach(); | 734 heapSnapshotView._allocationWidget.detach(); |
| 733 if (heapSnapshotView._statisticsView) | 735 if (heapSnapshotView._statisticsView) |
| 734 heapSnapshotView._statisticsView.detach(); | 736 heapSnapshotView._statisticsView.detach(); |
| 735 | 737 |
| 736 heapSnapshotView._splitWidget.detach(); | 738 heapSnapshotView._splitWidget.detach(); |
| 737 heapSnapshotView._splitWidget.detachChildWidgets(); | 739 heapSnapshotView._splitWidget.detachChildWidgets(); |
| 738 } | 740 } |
| 739 | 741 |
| 740 /** | 742 /** |
| 741 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 743 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 742 * @return {?UI.DataGrid} | 744 * @return {?DataGrid.DataGrid} |
| 743 */ | 745 */ |
| 744 masterGrid(heapSnapshotView) { | 746 masterGrid(heapSnapshotView) { |
| 745 return null; | 747 return null; |
| 746 } | 748 } |
| 747 | 749 |
| 748 /** | 750 /** |
| 749 * @return {string} | 751 * @return {string} |
| 750 */ | 752 */ |
| 751 title() { | 753 title() { |
| 752 return this._title; | 754 return this._title; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 782 return; | 784 return; |
| 783 heapSnapshotView._trackingOverviewGrid.show( | 785 heapSnapshotView._trackingOverviewGrid.show( |
| 784 heapSnapshotView._searchableView.element, heapSnapshotView._splitWidget.
element); | 786 heapSnapshotView._searchableView.element, heapSnapshotView._splitWidget.
element); |
| 785 heapSnapshotView._trackingOverviewGrid.update(); | 787 heapSnapshotView._trackingOverviewGrid.update(); |
| 786 heapSnapshotView._trackingOverviewGrid._updateGrid(); | 788 heapSnapshotView._trackingOverviewGrid._updateGrid(); |
| 787 } | 789 } |
| 788 | 790 |
| 789 /** | 791 /** |
| 790 * @override | 792 * @override |
| 791 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 793 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 792 * @return {?UI.DataGrid} | 794 * @return {?DataGrid.DataGrid} |
| 793 */ | 795 */ |
| 794 masterGrid(heapSnapshotView) { | 796 masterGrid(heapSnapshotView) { |
| 795 return heapSnapshotView._constructorsDataGrid; | 797 return heapSnapshotView._constructorsDataGrid; |
| 796 } | 798 } |
| 797 | 799 |
| 798 /** | 800 /** |
| 799 * @override | 801 * @override |
| 800 * @return {boolean} | 802 * @return {boolean} |
| 801 */ | 803 */ |
| 802 supportsSearch() { | 804 supportsSearch() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 820 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._diffWidget); | 822 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._diffWidget); |
| 821 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectDetai
lsView); | 823 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectDetai
lsView); |
| 822 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.element)
; | 824 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.element)
; |
| 823 heapSnapshotView._baseSelect.setVisible(true); | 825 heapSnapshotView._baseSelect.setVisible(true); |
| 824 heapSnapshotView._classNameFilter.setVisible(true); | 826 heapSnapshotView._classNameFilter.setVisible(true); |
| 825 } | 827 } |
| 826 | 828 |
| 827 /** | 829 /** |
| 828 * @override | 830 * @override |
| 829 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 831 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 830 * @return {?UI.DataGrid} | 832 * @return {?DataGrid.DataGrid} |
| 831 */ | 833 */ |
| 832 masterGrid(heapSnapshotView) { | 834 masterGrid(heapSnapshotView) { |
| 833 return heapSnapshotView._diffDataGrid; | 835 return heapSnapshotView._diffDataGrid; |
| 834 } | 836 } |
| 835 | 837 |
| 836 /** | 838 /** |
| 837 * @override | 839 * @override |
| 838 * @return {boolean} | 840 * @return {boolean} |
| 839 */ | 841 */ |
| 840 supportsSearch() { | 842 supportsSearch() { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 856 */ | 858 */ |
| 857 activate(heapSnapshotView) { | 859 activate(heapSnapshotView) { |
| 858 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._containmentWid
get); | 860 heapSnapshotView._splitWidget.setMainWidget(heapSnapshotView._containmentWid
get); |
| 859 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectDetai
lsView); | 861 heapSnapshotView._splitWidget.setSidebarWidget(heapSnapshotView._objectDetai
lsView); |
| 860 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.element)
; | 862 heapSnapshotView._splitWidget.show(heapSnapshotView._searchableView.element)
; |
| 861 } | 863 } |
| 862 | 864 |
| 863 /** | 865 /** |
| 864 * @override | 866 * @override |
| 865 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 867 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 866 * @return {?UI.DataGrid} | 868 * @return {?DataGrid.DataGrid} |
| 867 */ | 869 */ |
| 868 masterGrid(heapSnapshotView) { | 870 masterGrid(heapSnapshotView) { |
| 869 return heapSnapshotView._containmentDataGrid; | 871 return heapSnapshotView._containmentDataGrid; |
| 870 } | 872 } |
| 871 }; | 873 }; |
| 872 | 874 |
| 873 /** | 875 /** |
| 874 * @unrestricted | 876 * @unrestricted |
| 875 */ | 877 */ |
| 876 Profiler.HeapSnapshotView.AllocationPerspective = class extends Profiler.HeapSna
pshotView.Perspective { | 878 Profiler.HeapSnapshotView.AllocationPerspective = class extends Profiler.HeapSna
pshotView.Perspective { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 914 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 913 */ | 915 */ |
| 914 deactivate(heapSnapshotView) { | 916 deactivate(heapSnapshotView) { |
| 915 this._allocationSplitWidget.detach(); | 917 this._allocationSplitWidget.detach(); |
| 916 super.deactivate(heapSnapshotView); | 918 super.deactivate(heapSnapshotView); |
| 917 } | 919 } |
| 918 | 920 |
| 919 /** | 921 /** |
| 920 * @override | 922 * @override |
| 921 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 923 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 922 * @return {?UI.DataGrid} | 924 * @return {?DataGrid.DataGrid} |
| 923 */ | 925 */ |
| 924 masterGrid(heapSnapshotView) { | 926 masterGrid(heapSnapshotView) { |
| 925 return heapSnapshotView._allocationDataGrid; | 927 return heapSnapshotView._allocationDataGrid; |
| 926 } | 928 } |
| 927 }; | 929 }; |
| 928 | 930 |
| 929 /** | 931 /** |
| 930 * @unrestricted | 932 * @unrestricted |
| 931 */ | 933 */ |
| 932 Profiler.HeapSnapshotView.StatisticsPerspective = class extends Profiler.HeapSna
pshotView.Perspective { | 934 Profiler.HeapSnapshotView.StatisticsPerspective = class extends Profiler.HeapSna
pshotView.Perspective { |
| 933 constructor() { | 935 constructor() { |
| 934 super(Common.UIString('Statistics')); | 936 super(Common.UIString('Statistics')); |
| 935 } | 937 } |
| 936 | 938 |
| 937 /** | 939 /** |
| 938 * @override | 940 * @override |
| 939 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 941 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 940 */ | 942 */ |
| 941 activate(heapSnapshotView) { | 943 activate(heapSnapshotView) { |
| 942 heapSnapshotView._statisticsView.show(heapSnapshotView._searchableView.eleme
nt); | 944 heapSnapshotView._statisticsView.show(heapSnapshotView._searchableView.eleme
nt); |
| 943 } | 945 } |
| 944 | 946 |
| 945 /** | 947 /** |
| 946 * @override | 948 * @override |
| 947 * @param {!Profiler.HeapSnapshotView} heapSnapshotView | 949 * @param {!Profiler.HeapSnapshotView} heapSnapshotView |
| 948 * @return {?UI.DataGrid} | 950 * @return {?DataGrid.DataGrid} |
| 949 */ | 951 */ |
| 950 masterGrid(heapSnapshotView) { | 952 masterGrid(heapSnapshotView) { |
| 951 return null; | 953 return null; |
| 952 } | 954 } |
| 953 }; | 955 }; |
| 954 | 956 |
| 955 /** | 957 /** |
| 956 * @implements {SDK.TargetManager.Observer} | 958 * @implements {SDK.TargetManager.Observer} |
| 957 * @unrestricted | 959 * @unrestricted |
| 958 */ | 960 */ |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 Profiler.HeapTrackingOverviewGrid = class extends UI.VBox { | 1638 Profiler.HeapTrackingOverviewGrid = class extends UI.VBox { |
| 1637 /** | 1639 /** |
| 1638 * @param {!Profiler.HeapProfileHeader} heapProfileHeader | 1640 * @param {!Profiler.HeapProfileHeader} heapProfileHeader |
| 1639 */ | 1641 */ |
| 1640 constructor(heapProfileHeader) { | 1642 constructor(heapProfileHeader) { |
| 1641 super(); | 1643 super(); |
| 1642 this.element.id = 'heap-recording-view'; | 1644 this.element.id = 'heap-recording-view'; |
| 1643 this.element.classList.add('heap-tracking-overview'); | 1645 this.element.classList.add('heap-tracking-overview'); |
| 1644 | 1646 |
| 1645 this._overviewContainer = this.element.createChild('div', 'heap-overview-con
tainer'); | 1647 this._overviewContainer = this.element.createChild('div', 'heap-overview-con
tainer'); |
| 1646 this._overviewGrid = new UI.OverviewGrid('heap-recording'); | 1648 this._overviewGrid = new Perf_UI.OverviewGrid('heap-recording'); |
| 1647 this._overviewGrid.element.classList.add('fill'); | 1649 this._overviewGrid.element.classList.add('fill'); |
| 1648 | 1650 |
| 1649 this._overviewCanvas = this._overviewContainer.createChild('canvas', 'heap-r
ecording-overview-canvas'); | 1651 this._overviewCanvas = this._overviewContainer.createChild('canvas', 'heap-r
ecording-overview-canvas'); |
| 1650 this._overviewContainer.appendChild(this._overviewGrid.element); | 1652 this._overviewContainer.appendChild(this._overviewGrid.element); |
| 1651 this._overviewCalculator = new Profiler.HeapTrackingOverviewGrid.OverviewCal
culator(); | 1653 this._overviewCalculator = new Profiler.HeapTrackingOverviewGrid.OverviewCal
culator(); |
| 1652 this._overviewGrid.addEventListener(UI.OverviewGrid.Events.WindowChanged, th
is._onWindowChanged, this); | 1654 this._overviewGrid.addEventListener(Perf_UI.OverviewGrid.Events.WindowChange
d, this._onWindowChanged, this); |
| 1653 | 1655 |
| 1654 this._profileSamples = heapProfileHeader.fromFile() ? new Profiler.TrackingH
eapSnapshotProfileType.Samples() : | 1656 this._profileSamples = heapProfileHeader.fromFile() ? new Profiler.TrackingH
eapSnapshotProfileType.Samples() : |
| 1655 heapProfileHeader._pro
fileSamples; | 1657 heapProfileHeader._pro
fileSamples; |
| 1656 this._profileType = heapProfileHeader.profileType(); | 1658 this._profileType = heapProfileHeader.profileType(); |
| 1657 if (!heapProfileHeader.fromFile() && heapProfileHeader.profileType().profile
BeingRecorded() === heapProfileHeader) { | 1659 if (!heapProfileHeader.fromFile() && heapProfileHeader.profileType().profile
BeingRecorded() === heapProfileHeader) { |
| 1658 this._profileType.addEventListener( | 1660 this._profileType.addEventListener( |
| 1659 Profiler.TrackingHeapSnapshotProfileType.HeapStatsUpdate, this._onHeap
StatsUpdate, this); | 1661 Profiler.TrackingHeapSnapshotProfileType.HeapStatsUpdate, this._onHeap
StatsUpdate, this); |
| 1660 this._profileType.addEventListener( | 1662 this._profileType.addEventListener( |
| 1661 Profiler.TrackingHeapSnapshotProfileType.TrackingStopped, this._onStop
Tracking, this); | 1663 Profiler.TrackingHeapSnapshotProfileType.TrackingStopped, this._onStop
Tracking, this); |
| 1662 } | 1664 } |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1920 var scaleChange = target / this._currentScale; | 1922 var scaleChange = target / this._currentScale; |
| 1921 this._currentScale *= Number.constrain(scaleChange, 1 / maxChangePerDelta,
maxChangePerDelta); | 1923 this._currentScale *= Number.constrain(scaleChange, 1 / maxChangePerDelta,
maxChangePerDelta); |
| 1922 } else { | 1924 } else { |
| 1923 this._currentScale = target; | 1925 this._currentScale = target; |
| 1924 } | 1926 } |
| 1925 return this._currentScale; | 1927 return this._currentScale; |
| 1926 } | 1928 } |
| 1927 }; | 1929 }; |
| 1928 | 1930 |
| 1929 /** | 1931 /** |
| 1930 * @implements {UI.TimelineGrid.Calculator} | 1932 * @implements {Perf_UI.TimelineGrid.Calculator} |
| 1931 * @unrestricted | 1933 * @unrestricted |
| 1932 */ | 1934 */ |
| 1933 Profiler.HeapTrackingOverviewGrid.OverviewCalculator = class { | 1935 Profiler.HeapTrackingOverviewGrid.OverviewCalculator = class { |
| 1934 /** | 1936 /** |
| 1935 * @override | 1937 * @override |
| 1936 * @return {number} | 1938 * @return {number} |
| 1937 */ | 1939 */ |
| 1938 paddingLeft() { | 1940 paddingLeft() { |
| 1939 return 0; | 1941 return 0; |
| 1940 } | 1942 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 } | 2002 } |
| 2001 }; | 2003 }; |
| 2002 | 2004 |
| 2003 /** | 2005 /** |
| 2004 * @unrestricted | 2006 * @unrestricted |
| 2005 */ | 2007 */ |
| 2006 Profiler.HeapSnapshotStatisticsView = class extends UI.VBox { | 2008 Profiler.HeapSnapshotStatisticsView = class extends UI.VBox { |
| 2007 constructor() { | 2009 constructor() { |
| 2008 super(); | 2010 super(); |
| 2009 this.setMinimumSize(50, 25); | 2011 this.setMinimumSize(50, 25); |
| 2010 this._pieChart = new UI.PieChart(150, Profiler.HeapSnapshotStatisticsView._v
alueFormatter, true); | 2012 this._pieChart = new Perf_UI.PieChart(150, Profiler.HeapSnapshotStatisticsVi
ew._valueFormatter, true); |
| 2011 this._pieChart.element.classList.add('heap-snapshot-stats-pie-chart'); | 2013 this._pieChart.element.classList.add('heap-snapshot-stats-pie-chart'); |
| 2012 this.element.appendChild(this._pieChart.element); | 2014 this.element.appendChild(this._pieChart.element); |
| 2013 this._labels = this.element.createChild('div', 'heap-snapshot-stats-legend')
; | 2015 this._labels = this.element.createChild('div', 'heap-snapshot-stats-legend')
; |
| 2014 } | 2016 } |
| 2015 | 2017 |
| 2016 /** | 2018 /** |
| 2017 * @param {number} value | 2019 * @param {number} value |
| 2018 * @return {string} | 2020 * @return {string} |
| 2019 */ | 2021 */ |
| 2020 static _valueFormatter(value) { | 2022 static _valueFormatter(value) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2096 var name = frameDiv.createChild('div'); | 2098 var name = frameDiv.createChild('div'); |
| 2097 name.textContent = UI.beautifyFunctionName(frame.functionName); | 2099 name.textContent = UI.beautifyFunctionName(frame.functionName); |
| 2098 if (frame.scriptId) { | 2100 if (frame.scriptId) { |
| 2099 var urlElement = this._linkifier.linkifyScriptLocation( | 2101 var urlElement = this._linkifier.linkifyScriptLocation( |
| 2100 this._target, String(frame.scriptId), frame.scriptName, frame.line -
1, frame.column - 1); | 2102 this._target, String(frame.scriptId), frame.scriptName, frame.line -
1, frame.column - 1); |
| 2101 frameDiv.appendChild(urlElement); | 2103 frameDiv.appendChild(urlElement); |
| 2102 } | 2104 } |
| 2103 } | 2105 } |
| 2104 } | 2106 } |
| 2105 }; | 2107 }; |
| OLD | NEW |