Bug 1549723 - disable browser_startup_mainthreadio.js and browser_startup_content_mainthreadio.js mochitests for debug builds, r=mconley.
authorFlorian Quèze <florian@queze.net>
Wed, 08 May 2019 08:56:26 +0000
changeset 534913 d81d08e2b3a115f803bfb2c033b885470a3e6a9d
parent 534912 5b6f4c23e1dda31d20126e00311629f252cb7dca
child 534914 9928e1d5bc06081359d16e04226e989d912484ee
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1549723
milestone68.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 1549723 - disable browser_startup_mainthreadio.js and browser_startup_content_mainthreadio.js mochitests for debug builds, r=mconley. Differential Revision: https://phabricator.services.mozilla.com/D30220
browser/base/content/test/performance/browser.ini
browser/base/content/test/performance/io/browser.ini
browser/base/moz.build
browser/components/tests/startupRecorder.js
--- a/browser/base/content/test/performance/browser.ini
+++ b/browser/base/content/test/performance/browser.ini
@@ -9,35 +9,29 @@ prefs =
   # representative of common startup.
   browser.migration.version=9999999
   browser.urlbar.quantumbar=true
   browser.startup.record=true
   gfx.canvas.willReadFrequently.enable=true
   # The form autofill framescript is only used in certain locales if this
   # pref is set to 'detect', which is the default value on non-Nightly.
   extensions.formautofill.available='on'
-environment =
-  MOZ_PROFILER_STARTUP=1
-  MOZ_PROFILER_STARTUP_FEATURES=js,mainthreadio
-  MOZ_PROFILER_STARTUP_ENTRIES=10000000
 support-files =
   head.js
 [browser_appmenu.js]
 skip-if = asan || debug || (os == 'win' && bits == 32) || (os == 'win' && processor == 'aarch64') # Bug 1382809, bug 1369959, Win32 because of intermittent OOM failures, bug 1533141 for aarch64
 [browser_preferences_usage.js]
 skip-if = !debug
 [browser_startup.js]
 [browser_startup_content.js]
 skip-if = !e10s
 [browser_startup_flicker.js]
 run-if = debug || devedition || nightly_build # Requires startupRecorder.js, which isn't shipped everywhere by default
 [browser_startup_hiddenwindow.js]
 skip-if = os == 'mac'
-[browser_startup_mainthreadio.js]
-[browser_startup_content_mainthreadio.js]
 [browser_tabclose_grow.js]
 [browser_tabclose.js]
 skip-if = (os == 'win') || (os == 'mac') # Bug 1488537, Bug 1531417, Bug 1497713
 [browser_tabdetach.js]
 [browser_tabopen.js]
 skip-if = (verify && (os == 'mac'))
 [browser_tabopen_squeeze.js]
 [browser_tabstrip_overflow_underflow.js]
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/performance/io/browser.ini
@@ -0,0 +1,20 @@
+[DEFAULT]
+# Currently disabled on debug due to debug-only failures, see bug 1549723.
+skip-if = debug || (os == "linux" && asan) # bug 1549729
+# to avoid overhead when running the browser normally, startupRecorder.js will
+# do almost nothing unless browser.startup.record is true.
+# gfx.canvas.willReadFrequently.enable is just an optimization, but needs to be
+# set during early startup to have an impact as a canvas will be used by
+# startupRecorder.js
+prefs =
+  # Skip migration work in BG__migrateUI for browser_startup.js since it isn't
+  # representative of common startup, and triggers Places I/O.
+  browser.migration.version=9999999
+  browser.startup.record=true
+  gfx.canvas.willReadFrequently.enable=true
+environment =
+  MOZ_PROFILER_STARTUP=1
+  MOZ_PROFILER_STARTUP_FEATURES=js,mainthreadio
+  MOZ_PROFILER_STARTUP_ENTRIES=10000000
+[../browser_startup_mainthreadio.js]
+[../browser_startup_content_mainthreadio.js]
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -29,16 +29,17 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/historySwipeAnimation/browser.ini',
     'content/test/keyboard/browser.ini',
     'content/test/menubar/browser.ini',
     'content/test/metaTags/browser.ini',
     'content/test/pageActions/browser.ini',
     'content/test/pageinfo/browser.ini',
     'content/test/performance/browser.ini',
     'content/test/performance/hidpi/browser.ini',
+    'content/test/performance/io/browser.ini',
     'content/test/performance/legacyurlbar/browser.ini',
     'content/test/performance/lowdpi/browser.ini',
     'content/test/permissions/browser.ini',
     'content/test/plugins/browser.ini',
     'content/test/popupNotifications/browser.ini',
     'content/test/popups/browser.ini',
     'content/test/referrer/browser.ini',
     'content/test/sanitize/browser.ini',
--- a/browser/components/tests/startupRecorder.js
+++ b/browser/components/tests/startupRecorder.js
@@ -160,16 +160,22 @@ startupRecorder.prototype = {
         win = null;
         this.data.frames = paints;
         this.data.prefStats = {};
         if (AppConstants.DEBUG) {
           Services.prefs.readStats((key, value) => this.data.prefStats[key] = value);
         }
         paints = null;
 
+        let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
+        if (!env.exists("MOZ_PROFILER_STARTUP")) {
+          this._resolve();
+          this._resolve = null;
+          return;
+        }
 
         Services.profiler.getProfileDataAsync().then(profileData => {
           this.data.profile = profileData;
           // There's no equivalent StartProfiler call in this file because the
           // profiler is started using the MOZ_PROFILER_STARTUP environment
           // variable in browser/base/content/test/performance/browser.ini
           Services.profiler.StopProfiler();