Skip to content

Expand the remote profiling instructions.#1536

Merged
mstange merged 1 commit into
firefox-devtools:masterfrom
mstange:expand-remote-profiling
Dec 4, 2018
Merged

Expand the remote profiling instructions.#1536
mstange merged 1 commit into
firefox-devtools:masterfrom
mstange:expand-remote-profiling

Conversation

@mstange

@mstange mstange commented Nov 30, 2018

Copy link
Copy Markdown
Contributor

@mstange mstange self-assigned this Nov 30, 2018
@mstange mstange requested a review from julienw November 30, 2018 04:35
@mstange mstange force-pushed the expand-remote-profiling branch 3 times, most recently from 4d8f981 to 471f882 Compare November 30, 2018 04:40
@codecov

codecov Bot commented Nov 30, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1536 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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      197

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 048b621...0d9fbc9. Read the comment docs.

@mstange mstange force-pushed the expand-remote-profiling branch from 471f882 to 047788c Compare November 30, 2018 04:44

@julienw julienw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?).

Comment thread docs-user/guide-remote-profiling.md Outdated
- 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think we should put the links here instead of leaving them above.

Comment thread docs-user/guide-remote-profiling.md Outdated

### 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's a "N" job ?

* 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread docs-user/guide-remote-profiling.md Outdated

Here's a QR code for that URL:

![https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.latest.mobile.android-api-16-opt/artifacts/public/build/geckoview_example.apk](./images/qr-gve-nightly.gif)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread docs-user/guide-remote-profiling.md Outdated

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mstange mstange force-pushed the expand-remote-profiling branch from 047788c to 7dd3230 Compare December 4, 2018 16:47
@mstange mstange force-pushed the expand-remote-profiling branch from 7dd3230 to 0d9fbc9 Compare December 4, 2018 16:48
@mstange mstange merged commit d03fd3d into firefox-devtools:master Dec 4, 2018
@mstange mstange mentioned this pull request Dec 4, 2018
mstange added a commit that referenced this pull request Dec 4, 2018
* Properly handle Service Worker life cycle events (#1520)
* Add Windows demangling support (#1537)
* Expand the instructions for remote profiling (#1536)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants