Bug 1602800 - Move profiler recording preferences from firefox.js to all.js r=gregtatum
authorNazım Can Altınova <canaltinova@gmail.com>
Thu, 12 Dec 2019 13:52:34 +0000
changeset 506678 16642f81cdc42ad89ee4a1cc252c558a270143ce
parent 506677 6b057ba06b4a779f9bbb570488a3b3d16932da8d
child 506679 0694837833fecabb4faae5d12045191ed3ef1fd0
push id36910
push usercsabou@mozilla.com
push dateThu, 12 Dec 2019 21:50:40 +0000
treeherdermozilla-central@0f6958f49842 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgregtatum
bugs1602800
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1602800 - Move profiler recording preferences from firefox.js to all.js r=gregtatum We had to do it because firefox android doesn't use that file. There is a mobile.js file for that purpose. We had to move all recording preferences to all.js and add the android only preference to mobile.js to be able to handle that better. Differential Revision: https://phabricator.services.mozilla.com/D56719
browser/app/profile/firefox.js
mobile/android/app/mobile.js
modules/libpref/init/all.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -2069,47 +2069,16 @@ pref("devtools.performance.ui.enable-mem
 
 // Enable experimental options in the UI only in Nightly
 #if defined(NIGHTLY_BUILD)
   pref("devtools.performance.ui.experimental", true);
 #else
   pref("devtools.performance.ui.experimental", false);
 #endif
 
-// Preferences for the new performance panel.
-// This pref configures the base URL for the profiler.firefox.com instance to
-// use. This is useful so that a developer can change it while working on
-// profiler.firefox.com, or in tests. This isn't exposed directly to the user.
-pref("devtools.performance.recording.ui-base-url", "https://profiler.firefox.com");
-
-// Profiler buffer size. It is the maximum number of 8-bytes entries in the
-// profiler's buffer. 10000000 is ~80mb.
-pref("devtools.performance.recording.entries", 10000000);
-// Profiler interval in microseconds. 1000µs is 1ms
-pref("devtools.performance.recording.interval", 1000);
-// Profiler duration of entries in the profiler's buffer in seconds.
-// `0` means no time limit for the markers, they roll off naturally from the
-// circular buffer.
-pref("devtools.performance.recording.duration", 0);
-// Profiler feature set. See tools/profiler/core/platform.cpp for features and
-// explanations.
-#if defined(__ANDROID__)
-  // If it's android, add "java" feature as well. Other features must be same
-  // with else branch. Please update both of them.
-  pref("devtools.performance.recording.features", "[\"js\",\"leaf\",\"stackwalk\",\"java\"]");
-#else
-  // Please update the if branch as well if you upadate this.
-  pref("devtools.performance.recording.features", "[\"js\",\"leaf\",\"stackwalk\"]");
-#endif
-pref("devtools.performance.recording.threads", "[\"GeckoMain\",\"Compositor\",\"Renderer\"]");
-// A JSON array of strings, where each string is a file path to an objdir on
-// the host machine. This is used in order to look up symbol information from
-// build artifacts of local builds.
-pref("devtools.performance.recording.objdirs", "[]");
-
 // The default cache UI setting
 pref("devtools.cache.disabled", false);
 
 // The default service workers UI setting
 pref("devtools.serviceWorkers.testing.enabled", false);
 
 // Enable the Network Monitor
 pref("devtools.netmonitor.enabled", true);
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -338,16 +338,23 @@ pref("dom.max_script_run_time", 20);
 
 // Absolute path to the devtools unix domain socket file used
 // to communicate with a usb cable via adb forward.
 pref("devtools.debugger.unix-domain-socket", "@ANDROID_PACKAGE_NAME@/firefox-debugger-socket");
 
 pref("devtools.remote.usb.enabled", false);
 pref("devtools.remote.wifi.enabled", false);
 
+// Preference for the new performance panel.
+// Profiler feature set. See tools/profiler/core/platform.cpp for features and
+// explanations. Android additionally has "java" feature but other features must
+// be the same. If you intend to change the default value of this pref, please
+// don't forget to change the all.js accordingly.
+pref("devtools.performance.recording.features", "[\"js\",\"leaf\",\"stackwalk\",\"java\"]");
+
 // With the typical screen sizes on mobile devices, we want to wrap page sources by default.
 pref("view_source.wrap_long_lines", true);
 
 
 pref("ui.touch.radius.enabled", false);
 pref("ui.touch.radius.leftmm", 3);
 pref("ui.touch.radius.topmm", 5);
 pref("ui.touch.radius.rightmm", 3);
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -847,16 +847,43 @@ pref("toolkit.dump.emit", false);
 
 pref("devtools.recordreplay.mvp.enabled", false);
 pref("devtools.recordreplay.allowRepaintFailures", true);
 pref("devtools.recordreplay.includeSystemScripts", false);
 pref("devtools.recordreplay.logging", false);
 pref("devtools.recordreplay.loggingFull", false);
 pref("devtools.recordreplay.fastLogpoints", false);
 
+// Preferences for the new performance panel.
+// This pref configures the base URL for the profiler.firefox.com instance to
+// use. This is useful so that a developer can change it while working on
+// profiler.firefox.com, or in tests. This isn't exposed directly to the user.
+pref("devtools.performance.recording.ui-base-url", "https://profiler.firefox.com");
+
+// Profiler buffer size. It is the maximum number of 8-bytes entries in the
+// profiler's buffer. 10000000 is ~80mb.
+pref("devtools.performance.recording.entries", 10000000);
+// Profiler interval in microseconds. 1000µs is 1ms
+pref("devtools.performance.recording.interval", 1000);
+// Profiler duration of entries in the profiler's buffer in seconds.
+// `0` means no time limit for the markers, they roll off naturally from the
+// circular buffer.
+pref("devtools.performance.recording.duration", 0);
+// Profiler feature set. See tools/profiler/core/platform.cpp for features and
+// explanations. Android additionally has "java" feature but other features must
+// be the same. If you intend to change the default value of this pref, please
+// don't forget to change the mobile/android/app/mobile.js accordingly.
+pref("devtools.performance.recording.features", "[\"js\",\"leaf\",\"stackwalk\"]");
+// Threads to be captured by the profiler.
+pref("devtools.performance.recording.threads", "[\"GeckoMain\",\"Compositor\",\"Renderer\"]");
+// A JSON array of strings, where each string is a file path to an objdir on
+// the host machine. This is used in order to look up symbol information from
+// build artifacts of local builds.
+pref("devtools.performance.recording.objdirs", "[]");
+
 // view source
 pref("view_source.syntax_highlight", true);
 pref("view_source.wrap_long_lines", false);
 pref("view_source.editor.path", "");
 // allows to add further arguments to the editor; use the %LINE% placeholder
 // for jumping to a specific line (e.g. "/line:%LINE%" or "--goto %LINE%")
 pref("view_source.editor.args", "");