Expand the remote profiling instructions.#1536
Conversation
4d8f981 to
471f882
Compare
Codecov Report
@@ Coverage Diff @@
## master #1536 +/- ##
=======================================
Coverage 81.29% 81.29%
=======================================
Files 160 160
Lines 11120 11120
Branches 2744 2746 +2
=======================================
Hits 9040 9040
Misses 1883 1883
Partials 197 197Continue to review full report at Codecov.
|
471f882 to
047788c
Compare
julienw
left a comment
There was a problem hiding this comment.
Thanks for writing this, this is very complete.
I left a few comments and questions, most of them optional.
| - Focus is usable as a daily browser, and it has [a "Nightly" channel](https://github.com/mozilla-mobile/focus-android/wiki/Release-tracks#nightly), but that channel [uses GeckoView Beta](https://github.com/mozilla-mobile/focus-android/blob/master/build.gradle#L9-L10). This makes it almost useless for profiling work - you don't want to spend your time finding problems that have already been fixed. The Gecko Beta channel is also missing some recent profiling improvements. | ||
| - The reference browser uses a more recent version of GeckoView: It tries to stick very closely to mozilla-central, but since it uses [a pinned version of GeckoView](https://github.com/mozilla-mobile/android-components/blob/master/buildSrc/src/main/java/Gecko.kt#L6), it only refreshes to a new build of GeckoView whenever somebody manually updates the pinned version. [This happens around once a week](https://github.com/mozilla-mobile/android-components/commits/master/buildSrc/src/main/java/Gecko.kt). The reference browser is somewhat usable as a regular browser. It is not on the Google Play Store, so it does not auto-update, but you can install it from an apk manually. | ||
| - Fenix is supposed to become a GeckoView-based replacement for Fennec in the future, but at this point, it is in a very early stage and there might not even be downloadable builds for it. | ||
| - Lastly, there's the GeckoView-example app: This app is an extremely simple GeckoView-based app, which is generated along with every GeckoView build on the mozilla-central trees. That means you can get GeckoView-example apks for any GeckoView build you want. GeckoView-example is also the easiest GeckoView-based app to compile locally. It's not really usable as your daily browser, and it's not on the Play Store so it doesn't auto-update, but it's usually enough for performance testing and profiling work. |
There was a problem hiding this comment.
This is the best write-up I read about our current status on mobile, and I think this should be moved, or just duplicated, somewhere else (likely MDN ?).
| - The GeckoView example always has remote debugging enabled. | ||
| - Focus "Nightly" (which uses GeckoView Beta) lets you enable remote debugging in the Advanced section of the Settings. | ||
| - The reference browser [is about to get some UI to enable remote debugging](https://github.com/mozilla-mobile/reference-browser/pull/306), but for now, you have to manually go to about:config on the device and flip the prefs `devtools.debugger.remote-enabled` and `devtools.remote.usb.enabled` to true. These prefs are restartless. | ||
| - Fennec / Firefox for Android exposes separate toggles for debugging via USB and for debugging via Wi-Fi; its UI is what's described in the MDN instructions linked to above. |
There was a problem hiding this comment.
Then I think we should put the links here instead of leaving them above.
|
|
||
| ### Try builds | ||
|
|
||
| If you want to profile an Android build that the tryserver created for you, you have to kick off a "Sym" job on treeherder: Using treeherder's *Add new jobs* UI, schedule a "Sym" job for each platform whose "B" job you want symbols for. (And "SymN" if you have an "N" job you want symbols for.) These jobs gather symbol information from the corresponding build job and upload it to the Mozilla symbol server so that perf.html can use it. |
| * Avoid opening any other panels besides the Performance panel, to reduce the overhead of activated panels. | ||
| * After connecting to the device, do not select *Main Process* or any of the open tabs from the list of targets on the left. | ||
| * If WebIDE automatically reconnects to a debugging target from a previous session, disconnect, uncheck the two checkboxes in the WebIDE preferences (`Project -> Preferences`) and reconnect to the device. | ||
| * If WebIDE automatically reconnects to a debugging target from a previous session, disconnect, uncheck the two checkboxes in the WebIDE preferences (*Project* > *Preferences*) and reconnect to the device. |
There was a problem hiding this comment.
There's a tip we can add (here or in the "recording" session): if the recording doesn't start, it might be necessary to close and restart WebIDE to reset some internal state. (we really want to either fix this or help with the about:debugging effort to replace WebIDE).
|
|
||
| Here's a QR code for that URL: | ||
|
|
||
|  |
There was a problem hiding this comment.
nit: I'm not sure of the ALT for this image, maybe something like QR code for the link above is better.
(same for the QR code below)
|
|
||
| In order to install an app from an apk file onto your Android phone, follow these steps: | ||
|
|
||
| 1. First, if you already have another build of this app installed, uninstall it. A new installation doesn't automatically replace an existing installation; the installation process will fail if an app with that name already exists. Uninstalling can be done by dragging the app's icon into a screen corner that displays a trash can. |
There was a problem hiding this comment.
Note: that doesn't work like this on my Android, I need to go in the Settings or the Play Store to uninstall an app.
047788c to
7dd3230
Compare
7dd3230 to
0d9fbc9
Compare
Rendered