| 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 WebInspector.TimelineJSProfileProcessor = { }; | 6 WebInspector.TimelineJSProfileProcessor = { }; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * @param {!WebInspector.CPUProfileDataModel} jsProfileModel | 9 * @param {!WebInspector.CPUProfileDataModel} jsProfileModel |
| 10 * @param {!WebInspector.TracingModel.Thread} thread | 10 * @param {!WebInspector.TracingModel.Thread} thread |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return e.endTime || e.startTime; | 70 return e.endTime || e.startTime; |
| 71 } | 71 } |
| 72 | 72 |
| 73 /** | 73 /** |
| 74 * @param {!WebInspector.TracingModel.Event} e | 74 * @param {!WebInspector.TracingModel.Event} e |
| 75 * @return {boolean} | 75 * @return {boolean} |
| 76 */ | 76 */ |
| 77 function isJSInvocationEvent(e) | 77 function isJSInvocationEvent(e) |
| 78 { | 78 { |
| 79 switch (e.name) { | 79 switch (e.name) { |
| 80 case WebInspector.TimelineModel.RecordType.RunMicrotasks: |
| 80 case WebInspector.TimelineModel.RecordType.FunctionCall: | 81 case WebInspector.TimelineModel.RecordType.FunctionCall: |
| 81 case WebInspector.TimelineModel.RecordType.EvaluateScript: | 82 case WebInspector.TimelineModel.RecordType.EvaluateScript: |
| 82 return true; | 83 return true; |
| 83 } | 84 } |
| 84 return false; | 85 return false; |
| 85 } | 86 } |
| 86 | 87 |
| 87 var jsFrameEvents = []; | 88 var jsFrameEvents = []; |
| 88 var jsFramesStack = []; | 89 var jsFramesStack = []; |
| 89 var lockedJsStackDepth = []; | 90 var lockedJsStackDepth = []; |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 WebInspector.TracingModel.Phase.Instant, e.startTime, e.thread); | 489 WebInspector.TracingModel.Phase.Instant, e.startTime, e.thread); |
| 489 sampleEvent.ordinal = e.ordinal; | 490 sampleEvent.ordinal = e.ordinal; |
| 490 sampleEvent.args = {"data": {"stackTrace": stack }}; | 491 sampleEvent.args = {"data": {"stackTrace": stack }}; |
| 491 samples.push(sampleEvent); | 492 samples.push(sampleEvent); |
| 492 break; | 493 break; |
| 493 } | 494 } |
| 494 } | 495 } |
| 495 | 496 |
| 496 return samples; | 497 return samples; |
| 497 } | 498 } |
| OLD | NEW |