Changeset 141272 in webkit


Ignore:
Timestamp:
Jan 30, 2013 8:12:32 AM (11 years ago)
Author:
yurys@chromium.org
Message:

Web Inspector: remove NativeHeapGraph.js
https://bugs.webkit.org/show_bug.cgi?id=108342

Reviewed by Pavel Feldman.

NativeHeapGraph.js was removed as NativeHeapSnapshot.js provides more
features and shares its implementation with JSHeapSnapshot.

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/compile-front-end.py:
  • inspector/front-end/NativeHeapGraph.js: Removed.
  • inspector/front-end/NativeMemorySnapshotView.js:

(WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
(WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
(WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):

  • inspector/front-end/ProfilesPanel.js:
  • inspector/front-end/WebKit.qrc:
Location:
trunk/Source/WebCore
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141270 r141272  
     12013-01-30  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Web Inspector: remove NativeHeapGraph.js
     4        https://bugs.webkit.org/show_bug.cgi?id=108342
     5
     6        Reviewed by Pavel Feldman.
     7
     8        NativeHeapGraph.js was removed as NativeHeapSnapshot.js provides more
     9        features and shares its implementation with JSHeapSnapshot.
     10
     11        * WebCore.gypi:
     12        * WebCore.vcproj/WebCore.vcproj:
     13        * inspector/compile-front-end.py:
     14        * inspector/front-end/NativeHeapGraph.js: Removed.
     15        * inspector/front-end/NativeMemorySnapshotView.js:
     16        (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
     17        (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
     18        (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
     19        * inspector/front-end/ProfilesPanel.js:
     20        * inspector/front-end/WebKit.qrc:
     21
    1222013-01-30  Vladislav Kaznacheev  <kaznacheev@chromium.org>
    223
  • trunk/Source/WebCore/WebCore.gypi

    r141258 r141272  
    53795379            'inspector/front-end/HeapSnapshotWorkerDispatcher.js',
    53805380            'inspector/front-end/JSHeapSnapshot.js',
    5381             'inspector/front-end/NativeHeapGraph.js',
    53825381            'inspector/front-end/NativeHeapSnapshot.js',
    53835382            'inspector/front-end/NativeMemorySnapshotView.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r141258 r141272  
    7729077290                                </File>
    7729177291                                <File
    77292                                         RelativePath="..\inspector\front-end\NativeHeapGraph.js"
    77293                                         >
    77294                                 </File>
    77295                                 <File
    7729677292                                        RelativePath="..\inspector\front-end\NativeHeapSnapshot.js"
    7729777293                                        >
  • trunk/Source/WebCore/inspector/compile-front-end.py

    r141258 r141272  
    340340            "HeapSnapshotWorkerDispatcher.js",
    341341            "JSHeapSnapshot.js",
    342             "NativeHeapGraph.js",
    343342            "NativeHeapSnapshot.js",
    344343            "NativeMemorySnapshotView.js",
  • trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js

    r140390 r141272  
    272272        function didReceiveMemorySnapshot(error, memoryBlock, graph)
    273273        {
    274             profileHeader._graph = new WebInspector.NativeHeapGraph(graph);
     274            profileHeader._graph = graph;
    275275            profileHeader.isTemporary = false;
    276276            profileHeader.sidebarElement.subtitle = Number.bytesToString(/** @type{number} */(memoryBlock.size));
     
    339339    startSnapshotTransfer: function()
    340340    {
    341         setTimeout(this._takeNativeSnapshot.bind(this), 0);
     341        var meta = {
     342          "node_fields": [
     343            "type",
     344            "name",
     345            "id",
     346            "self_size",
     347            "edge_count"
     348          ],
     349          "node_types": [
     350            [
     351              "hidden",
     352              "array",
     353              "string",
     354              "object",
     355              "code",
     356              "closure",
     357              "regexp",
     358              "number",
     359              "native",
     360              "synthetic"
     361            ],
     362            "string",
     363            "number",
     364            "number",
     365            "number",
     366            "number",
     367            "number"
     368          ],
     369          "edge_fields": [
     370            "type",
     371            "name_or_index",
     372            "to_node"
     373          ],
     374          "edge_types": [
     375            [
     376              "context",
     377              "element",
     378              "property",
     379              "internal",
     380              "hidden",
     381              "shortcut",
     382              "weak"
     383            ],
     384            "string_or_number",
     385            "node"
     386          ]
     387        };
     388        var graph = this._graph;
     389        var heapSnapshot = {
     390            "snapshot": {
     391                "meta": meta,
     392                node_count: graph.nodes.length / 5,
     393                edge_count: graph.edges.length / 3,
     394                root_index: graph.nodes.length - 5
     395            },
     396            nodes: graph.nodes,
     397            edges: graph.edges,
     398            strings: graph.strings
     399        };
     400
     401        var chunk = JSON.stringify(heapSnapshot);
     402        this.transferChunk(chunk);
     403        this.finishHeapSnapshot();
    342404    },
    343405
     
    345407    {
    346408        return "NativeHeapSnapshot";
    347     },
    348 
    349     _takeNativeSnapshot: function()
    350     {
    351         /**
    352          * @param {?string} error
    353          * @param {?MemoryAgent.MemoryBlock} memoryBlock
    354          * @param {?Object=} graph
    355          */
    356         function didReceiveMemorySnapshot(error, memoryBlock, graph)
    357         {
    358             var meta = {
    359               "node_fields": [
    360                 "type",
    361                 "name",
    362                 "id",
    363                 "self_size",
    364                 "edge_count"
    365               ],
    366               "node_types": [
    367                 [
    368                   "hidden",
    369                   "array",
    370                   "string",
    371                   "object",
    372                   "code",
    373                   "closure",
    374                   "regexp",
    375                   "number",
    376                   "native",
    377                   "synthetic"
    378                 ],
    379                 "string",
    380                 "number",
    381                 "number",
    382                 "number",
    383                 "number",
    384                 "number"
    385               ],
    386               "edge_fields": [
    387                 "type",
    388                 "name_or_index",
    389                 "to_node"
    390               ],
    391               "edge_types": [
    392                 [
    393                   "context",
    394                   "element",
    395                   "property",
    396                   "internal",
    397                   "hidden",
    398                   "shortcut",
    399                   "weak"
    400                 ],
    401                 "string_or_number",
    402                 "node"
    403               ]
    404             };
    405             var heapSnapshot = {
    406                 "snapshot": {
    407                     "meta": meta,
    408                     node_count: graph.nodes.length / 5,
    409                     edge_count: graph.edges.length / 3,
    410                     root_index: graph.nodes.length - 5
    411                 },
    412                 nodes: graph.nodes,
    413                 edges: graph.edges,
    414                 strings: graph.strings
    415             };
    416 
    417             var chunk = JSON.stringify(heapSnapshot);
    418             this.transferChunk(chunk);
    419             this.finishHeapSnapshot();
    420         }
    421         MemoryAgent.getProcessMemoryDistribution(true, didReceiveMemorySnapshot.bind(this));
    422 
    423409    },
    424410
  • trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js

    r141250 r141272  
    14151415importScript("HeapSnapshotWorkerDispatcher.js");
    14161416importScript("JSHeapSnapshot.js");
    1417 importScript("NativeHeapGraph.js");
    14181417importScript("NativeHeapSnapshot.js");
    14191418importScript("NativeMemorySnapshotView.js");
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r141258 r141272  
    114114    <file>MetricsSidebarPane.js</file>
    115115    <file>NativeBreakpointsSidebarPane.js</file>
    116     <file>NativeHeapGraph.js</file>
    117116    <file>NativeHeapSnapshot.js</file>
    118117    <file>NativeMemorySnapshotView.js</file>
Note: See TracChangeset for help on using the changeset viewer.