| 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 * @param {!WebInspector.TracingManager} tracingManager | 7 * @param {!WebInspector.TracingManager} tracingManager |
| 8 * @param {!WebInspector.TracingModel} tracingModel | 8 * @param {!WebInspector.TracingModel} tracingModel |
| 9 * @param {!WebInspector.TimelineModel.Filter} recordFilter | 9 * @param {!WebInspector.TimelineModel.Filter} recordFilter |
| 10 * @extends {WebInspector.TimelineModel} | 10 * @extends {WebInspector.TimelineModel} |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 { | 114 { |
| 115 this.name = name; | 115 this.name = name; |
| 116 /** @type {!Array.<!WebInspector.TracingModel.Event>} */ | 116 /** @type {!Array.<!WebInspector.TracingModel.Event>} */ |
| 117 this.events = []; | 117 this.events = []; |
| 118 /** @type {!Array.<!Array.<!WebInspector.TracingModel.Event>>} */ | 118 /** @type {!Array.<!Array.<!WebInspector.TracingModel.Event>>} */ |
| 119 this.asyncEvents = []; | 119 this.asyncEvents = []; |
| 120 } | 120 } |
| 121 | 121 |
| 122 WebInspector.TracingTimelineModel.prototype = { | 122 WebInspector.TracingTimelineModel.prototype = { |
| 123 /** | 123 /** |
| 124 * @param {boolean} captureStacks | 124 * @param {boolean} captureCauses |
| 125 * @param {boolean} captureMemory | 125 * @param {boolean} captureMemory |
| 126 * @param {boolean} capturePictures | 126 * @param {boolean} capturePictures |
| 127 */ | 127 */ |
| 128 startRecording: function(captureStacks, captureMemory, capturePictures) | 128 startRecording: function(captureCauses, captureMemory, capturePictures) |
| 129 { | 129 { |
| 130 function disabledByDefault(category) | 130 function disabledByDefault(category) |
| 131 { | 131 { |
| 132 return "disabled-by-default-" + category; | 132 return "disabled-by-default-" + category; |
| 133 } | 133 } |
| 134 var categoriesArray = [ | 134 var categoriesArray = [ |
| 135 "-*", | 135 "-*", |
| 136 disabledByDefault("devtools.timeline"), | 136 disabledByDefault("devtools.timeline"), |
| 137 disabledByDefault("devtools.timeline.frame"), | 137 disabledByDefault("devtools.timeline.frame"), |
| 138 WebInspector.TracingModel.ConsoleEventCategory | 138 WebInspector.TracingModel.ConsoleEventCategory |
| 139 ]; | 139 ]; |
| 140 if (captureStacks) { | 140 if (captureCauses) { |
| 141 categoriesArray.push(disabledByDefault("devtools.timeline.stack")); | 141 categoriesArray.push(disabledByDefault("devtools.timeline.stack")); |
| 142 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) { | 142 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) { |
| 143 this._jsProfilerStarted = true; | 143 this._jsProfilerStarted = true; |
| 144 this._currentTarget = WebInspector.context.flavor(WebInspector.T
arget); | 144 this._currentTarget = WebInspector.context.flavor(WebInspector.T
arget); |
| 145 this._configureCpuProfilerSamplingInterval(); | 145 this._configureCpuProfilerSamplingInterval(); |
| 146 this._currentTarget.profilerAgent().start(); | 146 this._currentTarget.profilerAgent().start(); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 if (capturePictures) { | 149 if (capturePictures) { |
| 150 categoriesArray = categoriesArray.concat([ | 150 categoriesArray = categoriesArray.concat([ |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 * @param {!WebInspector.ChunkedReader} reader | 1137 * @param {!WebInspector.ChunkedReader} reader |
| 1138 */ | 1138 */ |
| 1139 onChunkTransferred: function(reader) { }, | 1139 onChunkTransferred: function(reader) { }, |
| 1140 | 1140 |
| 1141 /** | 1141 /** |
| 1142 * @param {!WebInspector.ChunkedReader} reader | 1142 * @param {!WebInspector.ChunkedReader} reader |
| 1143 * @param {!Event} event | 1143 * @param {!Event} event |
| 1144 */ | 1144 */ |
| 1145 onError: function(reader, event) { }, | 1145 onError: function(reader, event) { }, |
| 1146 } | 1146 } |
| OLD | NEW |