Skip to content
Permalink
Browse files
Web Inspector: remove support for legacy heap graph node format
https://bugs.webkit.org/show_bug.cgi?id=105802

Reviewed by Pavel Feldman.

Source/WebCore:

Removed support for old heap graph node format: we now always store edge count
in each node instead of the first edge index.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):

LayoutTests:

* inspector/profiler/heap-snapshot-comparison-dom-groups-change.html: switched to the new
heap graph node representation: store edge count for each node instead of the first edge
index.

Canonical link: https://commits.webkit.org/123986@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
yury-s committed Dec 27, 2012
1 parent 5463bb3 commit 0d465fd964e8f9889c52edce3b14d26f5819a106
Showing 4 changed files with 37 additions and 27 deletions.
@@ -1,3 +1,14 @@
2012-12-27 Yury Semikhatsky <yurys@chromium.org>

Web Inspector: remove support for legacy heap graph node format
https://bugs.webkit.org/show_bug.cgi?id=105802

Reviewed by Pavel Feldman.

* inspector/profiler/heap-snapshot-comparison-dom-groups-change.html: switched to the new
heap graph node representation: store edge count for each node instead of the first edge
index.

2012-12-27 Yury Semikhatsky <yurys@chromium.org>

Web Inspector: move js heap snapshot preprocessing to JSHeapSnapshot
@@ -16,18 +16,18 @@
return {
snapshot: {
meta: {
node_fields: ["type", "name", "id", "self_size", "retained_size", "dominator", "edges_index"],
node_fields: ["type", "name", "id", "self_size", "retained_size", "dominator", "edge_count"],
node_types: [["hidden", "object", "native"], "", "", "", "", "", ""],
edge_fields: ["type", "name_or_index", "to_node"],
edge_types: [["shortcut"], "", ""]
},
node_count: 4,
edge_count: 3},
nodes: [
0, 0, 1, 0, 21, 0, 0,
2, 1, 20, 7, 7, 0, 9,
2, 1, 30, 7, 7, 0, 9,
2, 1, 40, 7, 7, 0, 9],
0, 0, 1, 0, 21, 0, 3,
2, 1, 20, 7, 7, 0, 0,
2, 1, 30, 7, 7, 0, 0,
2, 1, 40, 7, 7, 0, 0],
edges: [
0, 0, 7,
0, 1, 14,
@@ -51,21 +51,21 @@
return {
snapshot: {
meta: {
node_fields: ["type", "name", "id", "self_size", "retained_size", "dominator", "edges_index"],
node_fields: ["type", "name", "id", "self_size", "retained_size", "dominator", "edge_count"],
node_types: [["hidden", "object", "native"], "", "", "", "", "", ""],
edge_fields: ["type", "name_or_index", "to_node"],
edge_types: [["shortcut"], "", ""]
},
node_count: 7,
edge_count: 6},
nodes: [
0, 0, 1, 0, 42, 0, 0,
2, 1, 20, 7, 7, 0, 18,
2, 1, 30, 7, 7, 0, 18,
2, 1, 5, 7, 7, 0, 18,
2, 1, 15, 7, 7, 0, 18,
2, 1, 25, 7, 7, 0, 18,
2, 1, 35, 7, 7, 0, 18],
0, 0, 1, 0, 42, 0, 6,
2, 1, 20, 7, 7, 0, 0,
2, 1, 30, 7, 7, 0, 0,
2, 1, 5, 7, 7, 0, 0,
2, 1, 15, 7, 7, 0, 0,
2, 1, 25, 7, 7, 0, 0,
2, 1, 35, 7, 7, 0, 0],
edges: [
0, 1, 7,
0, 2, 14,
@@ -1,3 +1,16 @@
2012-12-27 Yury Semikhatsky <yurys@chromium.org>

Web Inspector: remove support for legacy heap graph node format
https://bugs.webkit.org/show_bug.cgi?id=105802

Reviewed by Pavel Feldman.

Removed support for old heap graph node format: we now always store edge count
in each node instead of the first edge index.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):

2012-12-27 Yury Semikhatsky <yurys@chromium.org>

Web Inspector: move js heap snapshot preprocessing to JSHeapSnapshot
@@ -579,20 +579,6 @@ WebInspector.HeapSnapshot.prototype = {

_buildEdgeIndexes: function()
{
// Support for old serialization.
if (this._nodeEdgeCountOffset === -1) {
var nodes = this._nodes;
var nodeCount = this.nodeCount;
var firstEdgeIndexes = this._firstEdgeIndexes = new Uint32Array(nodeCount + 1);
var nodeFieldCount = this._nodeFieldCount;
var nodeEdgesIndexOffset = this._metaNode.node_fields.indexOf("edges_index");
firstEdgeIndexes[nodeCount] = this._containmentEdges.length;
for (var nodeOrdinal = 0; nodeOrdinal < nodeCount; ++nodeOrdinal) {
firstEdgeIndexes[nodeOrdinal] = nodes[nodeOrdinal * nodeFieldCount + nodeEdgesIndexOffset];
}
return;
}

var nodes = this._nodes;
var nodeCount = this.nodeCount;
var firstEdgeIndexes = this._firstEdgeIndexes = new Uint32Array(nodeCount + 1);

0 comments on commit 0d465fd

Please sign in to comment.