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

Unified Diff: Source/devtools/front_end/timeline/TimelinePanel.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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index 64e174ac40cb37c0eedd399cba062499ad735ac7..044179db622ce474b9f15fe1b0a250df3823926b 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -351,6 +351,13 @@ WebInspector.TimelinePanel.prototype = {
panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Causes"),
this._captureCausesSetting,
WebInspector.UIString("Capture causes for timeline events (e.g., stack traces)")));
+ if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) {
+ this._enableJSSamplingSettingSetting = WebInspector.settings.createSetting("timelineEnableJSSampling", false);
+ this._enableJSSamplingSettingSetting.addChangeListener(this._refreshViews, this);
+ panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Sampling"),
+ this._enableJSSamplingSettingSetting,
+ WebInspector.UIString("Enable JavaScript sampling profiler")));
+ }
this._captureMemorySetting = WebInspector.settings.createSetting("timelineCaptureMemory", false);
panelStatusBarElement.appendChild(this._createSettingCheckbox(WebInspector.UIString("Memory"),
this._captureMemorySetting,
@@ -638,7 +645,8 @@ WebInspector.TimelinePanel.prototype = {
_startRecording: function(userInitiated)
{
this._userInitiatedRecording = userInitiated;
- this._model.startRecording(this._captureCausesSetting.get(), this._captureMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLayersAndPicturesSetting.get());
+ var enableJSSampling = this._enableJSSamplingSettingSetting && this._enableJSSamplingSettingSetting.get();
+ this._model.startRecording(this._captureCausesSetting.get(), enableJSSampling, this._captureMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLayersAndPicturesSetting.get());
if (this._lazyFrameModel)
this._lazyFrameModel.setMergeRecords(false);
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698