Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineModel.js

Issue 661023002: DevTools: move JS sampling Timeline out of experimental (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
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} captureCauses 124 * @param {boolean} captureCauses
125 * @param {boolean} enableJSSampling
125 * @param {boolean} captureMemory 126 * @param {boolean} captureMemory
126 * @param {boolean} capturePictures 127 * @param {boolean} capturePictures
127 */ 128 */
128 startRecording: function(captureCauses, captureMemory, capturePictures) 129 startRecording: function(captureCauses, enableJSSampling, captureMemory, cap turePictures)
129 { 130 {
130 function disabledByDefault(category) 131 function disabledByDefault(category)
131 { 132 {
132 return "disabled-by-default-" + category; 133 return "disabled-by-default-" + category;
133 } 134 }
134 var categoriesArray = [ 135 var categoriesArray = [
135 "-*", 136 "-*",
136 disabledByDefault("devtools.timeline"), 137 disabledByDefault("devtools.timeline"),
137 disabledByDefault("devtools.timeline.frame"), 138 disabledByDefault("devtools.timeline.frame"),
138 WebInspector.TracingModel.ConsoleEventCategory 139 WebInspector.TracingModel.ConsoleEventCategory
139 ]; 140 ];
140 if (captureCauses) { 141 if (captureCauses || enableJSSampling)
141 categoriesArray.push(disabledByDefault("devtools.timeline.stack")); 142 categoriesArray.push(disabledByDefault("devtools.timeline.stack"));
142 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) { 143 if (enableJSSampling) {
143 this._jsProfilerStarted = true; 144 this._jsProfilerStarted = true;
144 this._currentTarget = WebInspector.context.flavor(WebInspector.T arget); 145 this._currentTarget = WebInspector.context.flavor(WebInspector.Targe t);
145 this._configureCpuProfilerSamplingInterval(); 146 this._configureCpuProfilerSamplingInterval();
146 this._currentTarget.profilerAgent().start(); 147 this._currentTarget.profilerAgent().start();
147 }
148 } 148 }
149
149 if (capturePictures) { 150 if (capturePictures) {
150 categoriesArray = categoriesArray.concat([ 151 categoriesArray = categoriesArray.concat([
151 disabledByDefault("devtools.timeline.layers"), 152 disabledByDefault("devtools.timeline.layers"),
152 disabledByDefault("devtools.timeline.picture"), 153 disabledByDefault("devtools.timeline.picture"),
153 disabledByDefault("blink.graphics_context_annotations")]); 154 disabledByDefault("blink.graphics_context_annotations")]);
154 } 155 }
155 var categories = categoriesArray.join(","); 156 var categories = categoriesArray.join(",");
156 this._startRecordingWithCategories(categories); 157 this._startRecordingWithCategories(categories);
157 }, 158 },
158 159
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 * @param {!WebInspector.ChunkedReader} reader 1097 * @param {!WebInspector.ChunkedReader} reader
1097 */ 1098 */
1098 onChunkTransferred: function(reader) { }, 1099 onChunkTransferred: function(reader) { },
1099 1100
1100 /** 1101 /**
1101 * @param {!WebInspector.ChunkedReader} reader 1102 * @param {!WebInspector.ChunkedReader} reader
1102 * @param {!Event} event 1103 * @param {!Event} event
1103 */ 1104 */
1104 onError: function(reader, event) { }, 1105 onError: function(reader, event) { },
1105 } 1106 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698