Web Inspector: switch heap profiler front-end to separate storage of nodes and edges
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 12:38:43 +0000 (12:38 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 12:38:43 +0000 (12:38 +0000)
commit4185896935cd7e58b76524445e2201d4d263bb00
tree9a6724875d33778995c35dba2853fb844f345f1e
parent35000c90089a59e22257dc6e7116653536ce20cb
Web Inspector: switch heap profiler front-end to separate storage of nodes and edges
https://bugs.webkit.org/show_bug.cgi?id=82453

PerformanceTests:

Updated heap profiler performance test after heap profiler front-end
changes.

Reviewed by Pavel Feldman.

* inspector/detailed-heapshots-smoke-test.html:

Source/WebCore:

When heap snapshot is completely loaded move nodes and containment edges
into two separate arrays. This way we don't need _nodeIndex and _nodePosition
maps to go from node offset inside the raw snapshot to its index and back, instead
we may just divide node offset by the number of node fields to get node index. After
the nodes and containment edges are separated original array (_nodes) is dropped.
All front-end code was switched to the new representation.

Reviewed by Pavel Feldman.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotRetainerEdge):
(WebInspector.HeapSnapshotRetainerEdge.prototype.clone):
(WebInspector.HeapSnapshotRetainerEdge.prototype.set edgeIndex):
(WebInspector.HeapSnapshotRetainerEdge.prototype.get _edge):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.hasNext):
(WebInspector.HeapSnapshotNode.prototype.get edgesCount):
(WebInspector.HeapSnapshotNode.prototype.get rawEdges):
(WebInspector.HeapSnapshotNode.prototype.get retainers):
(WebInspector.HeapSnapshotNode.prototype.get _nodes):
(WebInspector.HeapSnapshotNode.prototype._firstEdgeIndex):
(WebInspector.HeapSnapshotNode.prototype._afterLastEdgeIndex):
(WebInspector.HeapSnapshotNode.prototype.get _nextNodeIndex):
(WebInspector.HeapSnapshot.prototype._init):
(WebInspector.HeapSnapshot.prototype._splitNodesAndContainmentEdges):
(WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
(WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
(WebInspector.HeapSnapshot.prototype._buildRetainers):
(WebInspector.HeapSnapshot.prototype.dispose):
(WebInspector.HeapSnapshot.prototype.get maxNodeId):
(WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
(WebInspector.HeapSnapshot.prototype._bfs):
(WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
(WebInspector.HeapSnapshot.prototype._getDominatedIndex):
(WebInspector.HeapSnapshot.prototype._markInvisibleEdges):
(WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):

LayoutTests:

Updated heap profiler test after switching heap profiler front-end
to the new representation of nodes and edges.

Reviewed by Pavel Feldman.

* inspector/profiler/heap-snapshot-expected.txt:
* inspector/profiler/heap-snapshot-test.js:
(initialize_HeapSnapshotTest.InspectorTest.createHeapSnapshotMockObject):
* inspector/profiler/heap-snapshot.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/profiler/heap-snapshot-expected.txt
LayoutTests/inspector/profiler/heap-snapshot-test.js
LayoutTests/inspector/profiler/heap-snapshot.html
PerformanceTests/ChangeLog
PerformanceTests/inspector/detailed-heapshots-smoke-test.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/HeapSnapshot.js