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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js

Issue 2581003002: DevTools: remove extra options from Timeline Advanced mode. (Closed)
Patch Set: Bring back JavaScript option Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineLandingPage.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @implements {SDK.TargetManager.Observer} 6 * @implements {SDK.TargetManager.Observer}
7 * @implements {SDK.TracingManagerClient} 7 * @implements {SDK.TracingManagerClient}
8 * @unrestricted 8 * @unrestricted
9 */ 9 */
10 Timeline.TimelineController = class { 10 Timeline.TimelineController = class {
(...skipping 15 matching lines...) Expand all
26 this._markUnusedCSS = Common.settings.createSetting('timelineMarkUnusedCSS ', false); 26 this._markUnusedCSS = Common.settings.createSetting('timelineMarkUnusedCSS ', false);
27 } 27 }
28 28
29 /** 29 /**
30 * @param {!Timeline.TimelineController.CaptureOptions} options 30 * @param {!Timeline.TimelineController.CaptureOptions} options
31 * @param {!Array<!Extensions.ExtensionTraceProvider>} providers 31 * @param {!Array<!Extensions.ExtensionTraceProvider>} providers
32 */ 32 */
33 startRecording(options, providers) { 33 startRecording(options, providers) {
34 this._extensionTraceProviders = Extensions.extensionServer.traceProviders(). slice(); 34 this._extensionTraceProviders = Extensions.extensionServer.traceProviders(). slice();
35 35
36 /**
37 * @param {string} category
38 * @return {string}
39 */
36 function disabledByDefault(category) { 40 function disabledByDefault(category) {
37 return 'disabled-by-default-' + category; 41 return 'disabled-by-default-' + category;
38 } 42 }
39 var categoriesArray = [ 43 const categoriesArray = [
40 '-*', 'devtools.timeline', 'v8.execute', disabledByDefault('devtools.timel ine'), 44 '-*', 'devtools.timeline', 'v8.execute', disabledByDefault('devtools.timel ine'),
41 disabledByDefault('devtools.timeline.frame'), SDK.TracingModel.TopLevelEve ntCategory, 45 disabledByDefault('devtools.timeline.frame'), SDK.TracingModel.TopLevelEve ntCategory,
42 TimelineModel.TimelineModel.Category.Console, TimelineModel.TimelineModel. Category.UserTiming 46 TimelineModel.TimelineModel.Category.Console, TimelineModel.TimelineModel. Category.UserTiming
43 ]; 47 ];
44 categoriesArray.push(TimelineModel.TimelineModel.Category.LatencyInfo); 48 categoriesArray.push(TimelineModel.TimelineModel.Category.LatencyInfo);
45 49
46 if (Runtime.experiments.isEnabled('timelineV8RuntimeCallStats') && options.e nableJSSampling) 50 if (Runtime.experiments.isEnabled('timelineV8RuntimeCallStats') && options.e nableJSSampling)
47 categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling')); 51 categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling'));
48 if (Runtime.experiments.isEnabled('timelineTracingJSProfile') && options.ena bleJSSampling) { 52 if (Runtime.experiments.isEnabled('timelineTracingJSProfile') && options.ena bleJSSampling) {
49 categoriesArray.push(disabledByDefault('v8.cpu_profiler')); 53 categoriesArray.push(disabledByDefault('v8.cpu_profiler'));
50 if (Common.moduleSetting('highResolutionCpuProfiling').get()) 54 if (Common.moduleSetting('highResolutionCpuProfiling').get())
51 categoriesArray.push(disabledByDefault('v8.cpu_profiler.hires')); 55 categoriesArray.push(disabledByDefault('v8.cpu_profiler.hires'));
52 } 56 }
53 if (options.captureCauses || options.enableJSSampling) 57 if (options.captureCauses || options.enableJSSampling)
54 categoriesArray.push(disabledByDefault('devtools.timeline.stack')); 58 categoriesArray.push(disabledByDefault('devtools.timeline.stack'));
55 if (options.captureCauses && Runtime.experiments.isEnabled('timelineInvalida tionTracking')) 59 if (options.captureCauses && Runtime.experiments.isEnabled('timelineInvalida tionTracking'))
56 categoriesArray.push(disabledByDefault('devtools.timeline.invalidationTrac king')); 60 categoriesArray.push(disabledByDefault('devtools.timeline.invalidationTrac king'));
57 if (options.capturePictures) { 61 if (options.capturePictures) {
58 categoriesArray.push( 62 categoriesArray.push(
59 disabledByDefault('devtools.timeline.layers'), disabledByDefault('devt ools.timeline.picture'), 63 disabledByDefault('devtools.timeline.layers'), disabledByDefault('devt ools.timeline.picture'),
60 disabledByDefault('blink.graphics_context_annotations')); 64 disabledByDefault('blink.graphics_context_annotations'));
61 } 65 }
62 if (options.captureFilmStrip) 66 if (options.captureFilmStrip)
63 categoriesArray.push(disabledByDefault('devtools.screenshot')); 67 categoriesArray.push(disabledByDefault('devtools.screenshot'));
64 68
65 this._extensionSessions = providers.map(provider => new Timeline.ExtensionTr acingSession(provider, this._delegate)); 69 this._extensionSessions = providers.map(provider => new Timeline.ExtensionTr acingSession(provider, this._delegate));
66 this._extensionSessions.forEach(session => session.start()); 70 this._extensionSessions.forEach(session => session.start());
67 var categories = categoriesArray.join(','); 71 this._startRecordingWithCategories(categoriesArray.join(','), options.enable JSSampling);
68 this._startRecordingWithCategories(categories, options.enableJSSampling);
69 } 72 }
70 73
71 stopRecording() { 74 stopRecording() {
72 var tracingStoppedPromises = []; 75 var tracingStoppedPromises = [];
73 tracingStoppedPromises.push(new Promise(resolve => this._tracingCompleteCall back = resolve)); 76 tracingStoppedPromises.push(new Promise(resolve => this._tracingCompleteCall back = resolve));
74 tracingStoppedPromises.push(this._stopProfilingOnAllTargets()); 77 tracingStoppedPromises.push(this._stopProfilingOnAllTargets());
75 this._target.tracingManager.stop(); 78 this._target.tracingManager.stop();
76 79
77 if (!Runtime.experiments.isEnabled('timelineRuleUsageRecording') || !this._m arkUnusedCSS.get()) 80 if (!Runtime.experiments.isEnabled('timelineRuleUsageRecording') || !this._m arkUnusedCSS.get())
78 tracingStoppedPromises.push(SDK.targetManager.resumeAllTargets()); 81 tracingStoppedPromises.push(SDK.targetManager.resumeAllTargets());
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 313
311 /** @typedef {!{ 314 /** @typedef {!{
312 * captureCauses: (boolean|undefined), 315 * captureCauses: (boolean|undefined),
313 * enableJSSampling: (boolean|undefined), 316 * enableJSSampling: (boolean|undefined),
314 * captureMemory: (boolean|undefined), 317 * captureMemory: (boolean|undefined),
315 * capturePictures: (boolean|undefined), 318 * capturePictures: (boolean|undefined),
316 * captureFilmStrip: (boolean|undefined) 319 * captureFilmStrip: (boolean|undefined)
317 * }} 320 * }}
318 */ 321 */
319 Timeline.TimelineController.CaptureOptions; 322 Timeline.TimelineController.CaptureOptions;
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineLandingPage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698