diff --git a/docs-user/_sidebar.md b/docs-user/_sidebar.md index 402658de70..4374d7abae 100644 --- a/docs-user/_sidebar.md +++ b/docs-user/_sidebar.md @@ -5,7 +5,9 @@ * [Profiler Fundamentals](./guide-profiler-fundamentals.md) * [Stack samples and call trees](./guide-stack-samples-and-call-trees.md) * [Filtering call trees](./guide-filtering-call-trees.md) - * [Remote Profiling Firefox for Android](./guide-remote-profiling.md) + * [Profiling Firefox for Android](./guide-profiling-firefox-android.md) + * [Remote Profiling](./guide-remote-profiling.md) + * [Profiling directly on the device](./guide-profiling-android-directly-on-device.md) * [Memory Allocations](./memory-allocations.md) * [Advanced Topics](./advanced-topics.md) * [Profiling Firefox Startup & Shutdown](./guide-startup-shutdown.md) diff --git a/docs-user/guide-profiling-android-directly-on-device.md b/docs-user/guide-profiling-android-directly-on-device.md new file mode 100644 index 0000000000..fccf825c19 --- /dev/null +++ b/docs-user/guide-profiling-android-directly-on-device.md @@ -0,0 +1,34 @@ +# Profiling Firefox for Android directly on device + +The Firefox Profiler can be used without the remote debugging option. It offers a little less flexibility (can't edit the options and the profile is +automatically uploaded). However, it does allow you to capture a profile without the need of a PC. + +## Setup + +### Pick a build to profile +We recommend profiling a Firefox build from any release channel (i.e. not debug), whether downloaded from Google Play, Taskcluster, or built locally. + +### Enable secret settings on the mobile device + +To enable secret settings, follow these steps: + + - Click on the [three dot icon next to the URL bar](./images/about-url.png) + - Select the ["Settings" option](./images/settings-menu.png). + - Scroll to the bottom of the settings page and select the "About Firefox" + - Click the "Firefox" logo 5 times. [A toast should appear at the bottom of your screen with the number of click left before unlocking the secret menu](./images/secret-menu-toast.png). + - Go back to the "Settings" screen and scroll to the bottom where you should see the ["Start Profiler" option](./images/start-profiler.png). + +## Usage instructions + +### To start the profiler + + - Click on "Start Profiler" and you should see a dialogue appear. + - Choose one of the four options that matches the closest to what you're trying to profile. + - Click "Start Profiler" and a toast should appear with the "Profiler started" message. + +### To stop the profiler + + - Go back to the Settings screen + - Scroll to the bottom and you should see a "Stop profiler" option has replaced the "Start Profiler" one. + - After you click it, you should see a dialogue with a warning regarding the information contained in the profile. + - Once stopped, the URL for the profile that finished recording will be copied to your clipboard which you can then use to share. diff --git a/docs-user/guide-profiling-firefox-android.md b/docs-user/guide-profiling-firefox-android.md new file mode 100644 index 0000000000..89cdb27c2e --- /dev/null +++ b/docs-user/guide-profiling-firefox-android.md @@ -0,0 +1,7 @@ +# Profiling Firefox for Android + +Two options are possible: + +* [Remote Profiling Firefox for Android](./guide-remote-profiling.md) provides the most options but can be cumbersome to set up; +* [Profiling Firefox for Android directly on the device](./guide-profiling-android-directly-on-device.md) has fewer options but should be easier to set up. + diff --git a/docs-user/images/about-url.png b/docs-user/images/about-url.png new file mode 100644 index 0000000000..929e72e8ea Binary files /dev/null and b/docs-user/images/about-url.png differ diff --git a/docs-user/images/secret-menu-toast.png b/docs-user/images/secret-menu-toast.png new file mode 100644 index 0000000000..14ba52e4fb Binary files /dev/null and b/docs-user/images/secret-menu-toast.png differ diff --git a/docs-user/images/settings-menu.png b/docs-user/images/settings-menu.png new file mode 100644 index 0000000000..9275fd21df Binary files /dev/null and b/docs-user/images/settings-menu.png differ diff --git a/docs-user/images/start-profiler.png b/docs-user/images/start-profiler.png new file mode 100644 index 0000000000..3d0367089c Binary files /dev/null and b/docs-user/images/start-profiler.png differ