From 4e88697b5d4e366807ddf2166a5f2f1535a702ae Mon Sep 17 00:00:00 2001 From: Gerald Squelart Date: Fri, 8 May 2020 03:36:33 +0000 Subject: [PATCH] Bug 1632750 - Tweak about:profiling default buffer sizes - r=gregtatum Presets used 16Mi entries (128MiB) by default, but these numbers were a limit per process. Now that the limit is for the whole Firefox app, we would record a lot less information, because there are typically around 8 or more processes. So the default are now 8 times larger to roughly record a similar amount of profiling data. Also the custom buffer maximum size has been increased from 1GiB to 2GiB. Differential Revision: https://phabricator.services.mozilla.com/D73216 --- devtools/client/performance-new/components/Settings.js | 2 +- devtools/client/performance-new/popup/background.jsm.js | 8 ++++---- .../test/browser/browser_aboutprofiling-entries.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/devtools/client/performance-new/components/Settings.js b/devtools/client/performance-new/components/Settings.js index 54f1229d8fad..a02e4f1dc4fe 100644 --- a/devtools/client/performance-new/components/Settings.js +++ b/devtools/client/performance-new/components/Settings.js @@ -195,7 +195,7 @@ class Settings extends PureComponent { this._intervalExponentialScale = makeExponentialScale(0.01, 100); this._entriesExponentialScale = makePowerOf2Scale( 128 * 1024, - 128 * 1024 * 1024 + 256 * 1024 * 1024 ); } diff --git a/devtools/client/performance-new/popup/background.jsm.js b/devtools/client/performance-new/popup/background.jsm.js index 8a562b5e2740..cadbc5fbcbbc 100644 --- a/devtools/client/performance-new/popup/background.jsm.js +++ b/devtools/client/performance-new/popup/background.jsm.js @@ -85,7 +85,7 @@ const presets = { label: "Web Developer", description: "Recommended preset for most web app debugging, with low overhead.", - entries: 16 * 1024 * 1024, + entries: 128 * 1024 * 1024, interval: 1, features: ["screenshots", "js"], threads: ["GeckoMain", "Compositor", "Renderer", "DOM Worker"], @@ -94,7 +94,7 @@ const presets = { "firefox-platform": { label: "Firefox Platform", description: "Recommended preset for internal Firefox platform debugging.", - entries: 16 * 1024 * 1024, + entries: 128 * 1024 * 1024, interval: 1, features: ["screenshots", "js", "leaf", "stackwalk", "java"], threads: ["GeckoMain", "Compositor", "Renderer"], @@ -103,7 +103,7 @@ const presets = { "firefox-front-end": { label: "Firefox Front-End", description: "Recommended preset for internal Firefox front-end debugging.", - entries: 16 * 1024 * 1024, + entries: 128 * 1024 * 1024, interval: 1, features: ["screenshots", "js", "leaf", "stackwalk", "java"], threads: ["GeckoMain", "Compositor", "Renderer", "DOM Worker"], @@ -112,7 +112,7 @@ const presets = { media: { label: "Media", description: "Recommended preset for diagnosing audio and video problems.", - entries: 16 * 1024 * 1024, + entries: 128 * 1024 * 1024, interval: 1, features: ["js", "leaf", "stackwalk"], threads: [ diff --git a/devtools/client/performance-new/test/browser/browser_aboutprofiling-entries.js b/devtools/client/performance-new/test/browser/browser_aboutprofiling-entries.js index 3f62ccc5972a..4415387b16fc 100644 --- a/devtools/client/performance-new/test/browser/browser_aboutprofiling-entries.js +++ b/devtools/client/performance-new/test/browser/browser_aboutprofiling-entries.js @@ -10,7 +10,7 @@ add_task(async function test() { await withAboutProfiling(async document => { is( getActiveConfiguration().capacity, - Math.pow(2, 24), + 128 * 1024 * 1024, "The active configuration is set to a specific number initially. If this" + " test fails here, then the magic numbers here may need to be adjusted." ); @@ -21,7 +21,7 @@ add_task(async function test() { is( getActiveConfiguration().capacity, - Math.pow(2, 18), + 256 * 1024, "The capacity changed to a smaller value." ); });