tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit bd01f9f035b6d723b50caadc8ee63c92b1420735
parent b89534e0e124d068f85935ebca57a98cda305f17
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date:   Thu,  9 Oct 2025 00:12:39 +0000

Bug 1992009 - Add "Debug" profiler preset to Fenix on-device profiling presets. r=android-reviewers,jonalmeida

Differential Revision: https://phabricator.services.mozilla.com/D268019

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerStartDialogFragment.kt | 2++
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerUtils.kt | 17+++++++++++++++++
Mmobile/android/fenix/app/src/main/res/values/static_strings.xml | 2++
3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerStartDialogFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerStartDialogFragment.kt @@ -148,12 +148,14 @@ class ProfilerStartDialogFragment : AppCompatDialogFragment() { ProfilerSettings.Graphics -> stringResource(R.string.profiler_filter_graphics) ProfilerSettings.Media -> stringResource(R.string.profiler_filter_media) ProfilerSettings.Networking -> stringResource(R.string.profiler_filter_networking) + ProfilerSettings.Debug -> stringResource(R.string.profiler_filter_debug) } val settingDesc = when (setting) { ProfilerSettings.Firefox -> stringResource(R.string.profiler_filter_firefox_explain) ProfilerSettings.Graphics -> stringResource(R.string.profiler_filter_graphics_explain) ProfilerSettings.Media -> stringResource(R.string.profiler_filter_media_explain) ProfilerSettings.Networking -> stringResource(R.string.profiler_filter_networking_explain) + ProfilerSettings.Debug -> stringResource(R.string.profiler_filter_debug_explain) } ProfilerLabeledRadioButton( diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerUtils.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerUtils.kt @@ -97,6 +97,22 @@ private val networking_threads = arrayOf( "Renderer", "Socket Thread", "StreamTrans", "SwComposite", "TRR Background", ) +private val debug_features = arrayOf( + "cpu", + "ipcmessages", + "js", + "markersallthreads", + "processcpu", + "samplingallthreads", + "stackwalk", + "unregisteredthreads", + "flows", +) + +private val debug_threads = arrayOf( + "*", +) + /** * Profiler settings enum for grouping features and settings together */ @@ -105,6 +121,7 @@ enum class ProfilerSettings(val threads: Array<String>, val features: Array<Stri Graphics(graphics_threads, graphics_features), Media(media_threads, media_features), Networking(networking_threads, networking_features), + Debug(debug_threads, debug_features), } /** diff --git a/mobile/android/fenix/app/src/main/res/values/static_strings.xml b/mobile/android/fenix/app/src/main/res/values/static_strings.xml @@ -164,6 +164,8 @@ <string name="profiler_filter_media_explain">Preset for investigating audio and video bugs in Firefox</string> <string name="profiler_filter_networking">Networking</string> <string name="profiler_filter_networking_explain">Preset for investigating networking bugs in Firefox</string> + <string name="profiler_filter_debug">Debug</string> + <string name="profiler_filter_debug_explain">Preset for debugging. High overhead, do not use for performance work but use for focusing on understanding browser behavior.</string> <string name="profiler_start_dialog_started">Profiler started</string>