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 /** | 6 /** |
7 * @constructor | 7 * @constructor |
8 * @param {!ProfilerAgent.CPUProfile} profile | 8 * @param {!ProfilerAgent.CPUProfile} profile |
9 */ | 9 */ |
10 WebInspector.CPUProfileDataModel = function(profile) | 10 WebInspector.CPUProfileDataModel = function(profile) |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 --stackTop; | 286 --stackTop; |
287 } | 287 } |
288 | 288 |
289 for (var node = idToNode[prevId]; node.parent; node = node.parent) { | 289 for (var node = idToNode[prevId]; node.parent; node = node.parent) { |
290 var start = stackStartTimes[stackTop]; | 290 var start = stackStartTimes[stackTop]; |
291 var duration = sampleTime - start; | 291 var duration = sampleTime - start; |
292 stackChildrenDuration[stackTop - 1] += duration; | 292 stackChildrenDuration[stackTop - 1] += duration; |
293 closeFrameCallback(node.depth, node, start, duration, duration - sta
ckChildrenDuration[stackTop]); | 293 closeFrameCallback(node.depth, node, start, duration, duration - sta
ckChildrenDuration[stackTop]); |
294 --stackTop; | 294 --stackTop; |
295 } | 295 } |
| 296 }, |
| 297 |
| 298 /** |
| 299 * @param {number} index |
| 300 * @return {!ProfilerAgent.CPUProfileNode} |
| 301 */ |
| 302 nodeByIndex: function(index) |
| 303 { |
| 304 return this._idToNode[this.samples[index]]; |
296 } | 305 } |
| 306 |
297 } | 307 } |
OLD | NEW |