OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.ProfileNode} | 7 * @extends {WebInspector.ProfileNode} |
8 * @param {!ProfilerAgent.CPUProfileNode} sourceNode | 8 * @param {!ProfilerAgent.CPUProfileNode} sourceNode |
9 * @param {number} sampleTime | 9 * @param {number} sampleTime |
10 */ | 10 */ |
11 WebInspector.CPUProfileNode = function(sourceNode, sampleTime) | 11 WebInspector.CPUProfileNode = function(sourceNode, sampleTime) |
12 { | 12 { |
13 WebInspector.ProfileNode.call(this, sourceNode.functionName, sourceNode.scri
ptId, sourceNode.url, sourceNode.lineNumber, sourceNode.columnNumber); | 13 WebInspector.ProfileNode.call(this, sourceNode.functionName, sourceNode.scri
ptId, sourceNode.url, sourceNode.lineNumber, sourceNode.columnNumber); |
14 this.id = sourceNode.id; | 14 this.id = sourceNode.id; |
15 this.self = sourceNode.hitCount * sampleTime; | 15 this.self = sourceNode.hitCount * sampleTime; |
16 this.callUID = sourceNode.callUID; | |
17 this.positionTicks = sourceNode.positionTicks; | 16 this.positionTicks = sourceNode.positionTicks; |
18 this.deoptReason = sourceNode.deoptReason; | 17 this.deoptReason = sourceNode.deoptReason; |
19 } | 18 } |
20 | 19 |
21 WebInspector.CPUProfileNode.prototype = { | 20 WebInspector.CPUProfileNode.prototype = { |
22 __proto__: WebInspector.ProfileNode.prototype | 21 __proto__: WebInspector.ProfileNode.prototype |
23 } | 22 } |
24 | 23 |
25 /** | 24 /** |
26 * @constructor | 25 * @constructor |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 * @param {number} index | 288 * @param {number} index |
290 * @return {?WebInspector.CPUProfileNode} | 289 * @return {?WebInspector.CPUProfileNode} |
291 */ | 290 */ |
292 nodeByIndex: function(index) | 291 nodeByIndex: function(index) |
293 { | 292 { |
294 return this._idToNode.get(this.samples[index]) || null; | 293 return this._idToNode.get(this.samples[index]) || null; |
295 }, | 294 }, |
296 | 295 |
297 __proto__: WebInspector.ProfileTreeModel.prototype | 296 __proto__: WebInspector.ProfileTreeModel.prototype |
298 } | 297 } |
OLD | NEW |