Web Inspector: HeapSnapshot: introduce performance counter for HeapSnapshotConstructo...
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2012 13:48:08 +0000 (13:48 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2012 13:48:08 +0000 (13:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87393

Reviewed by Yury Semikhatsky.

PerformanceTests:

* inspector/heap-snapshot.html:

Source/WebCore:

* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype._aggregatesReceived):
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype._populateChildren):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/inspector/heap-snapshot.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js

index 13a15b2..034c1ce 100644 (file)
@@ -1,5 +1,14 @@
 2012-05-25  Ilya Tikhonovsky  <loislo@chromium.org>
 
+        Web Inspector: HeapSnapshot: introduce performance counter for HeapSnapshotConstructorsDataGrid._aggregatesReceived method.
+        https://bugs.webkit.org/show_bug.cgi?id=87393
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/heap-snapshot.html:
+
+2012-05-25  Ilya Tikhonovsky  <loislo@chromium.org>
+
         Web Inspector: HeapProfiler's perf test: each N-th run pushes the run results N-th times.
         https://bugs.webkit.org/show_bug.cgi?id=87476
 
index 16b0416..ba53874 100644 (file)
@@ -20,6 +20,7 @@ function test()
     InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_splitNodesAndContainmentEdges");
     InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildPostOrderIndex");
     InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildDominatorTree");
+    InspectorTest.measureFunction(WebInspector.HeapSnapshotConstructorsDataGrid.prototype, "_aggregatesReceived");
 
     function performanceTest(timer)
     {
index aa0a596..cdef8b1 100644 (file)
@@ -1,5 +1,34 @@
 2012-05-25  Ilya Tikhonovsky  <loislo@chromium.org>
 
+        Web Inspector: HeapSnapshot: introduce performance counter for HeapSnapshotConstructorsDataGrid._aggregatesReceived method.
+        https://bugs.webkit.org/show_bug.cgi?id=87393
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/HeapSnapshotDataGrids.js:
+        (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._aggregatesReceived):
+        (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._populateChildren):
+
+2012-05-25  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: drop obsolete WebInspector.Uint32Array and adjust snapshot chunk size for better transfer-snapshot metric.
+        https://bugs.webkit.org/show_bug.cgi?id=87490
+
+        Originally WebInspector.Uint32Array was used for dynamic array
+        reallocation because we had no information about expected arrays sizes.
+        Now we have these sizes and allocates array precisely.
+
+        Reviewed by Yury Semikhatsky.
+
+        * bindings/v8/ScriptHeapSnapshot.cpp:
+        (WebCore):
+        * inspector/front-end/HeapSnapshot.js:
+        * inspector/front-end/HeapSnapshotLoader.js:
+        (WebInspector.HeapSnapshotLoader.prototype._parseUintArray):
+        (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
+
+2012-05-25  Ilya Tikhonovsky  <loislo@chromium.org>
+
         Web Inspector: drop obsolete WebInspector.Uint32Array and adjust snapshot chunk size for better transfer-snapshot metric.
         https://bugs.webkit.org/show_bug.cgi?id=87490
 
index 88e5024..e50f1d2 100644 (file)
@@ -558,14 +558,15 @@ WebInspector.HeapSnapshotConstructorsDataGrid.prototype = {
         }
     },
 
+    _aggregatesReceived: function(key, aggregates)
+    {
+        for (var constructor in aggregates)
+            this.appendTopLevelNode(new WebInspector.HeapSnapshotConstructorNode(this, constructor, aggregates[constructor], key));
+        this.sortingChanged();
+    },
+
     _populateChildren: function()
     {
-        function aggregatesReceived(key, aggregates)
-        {
-            for (var constructor in aggregates)
-                this.appendTopLevelNode(new WebInspector.HeapSnapshotConstructorNode(this, constructor, aggregates[constructor], key));
-            this.sortingChanged();
-        }
 
         this.dispose();
         this.removeTopLevelNodes();
@@ -574,7 +575,7 @@ WebInspector.HeapSnapshotConstructorsDataGrid.prototype = {
         var key = this._profileIndex === -1 ? "allObjects" : this._minNodeId + ".." + this._maxNodeId;
         var filter = this._profileIndex === -1 ? null : "function(node) { var id = node.id(); return id > " + this._minNodeId + " && id <= " + this._maxNodeId + "; }";
 
-        this.snapshot.aggregates(false, key, filter, aggregatesReceived.bind(this, key));
+        this.snapshot.aggregates(false, key, filter, this._aggregatesReceived.bind(this, key));
     },
 
     _filterSelectIndexChanged: function(profiles, profileIndex)