Open Bug 1895854 Opened 1 year ago Updated 1 year ago

Support MOZ_PGO=1 android builds

Categories

(Firefox Build System :: Task Configuration, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: jnicol, Unassigned)

Details

Being able to perform local builds with PGO is important when profiling, but unfortunately ac_add_options MOZ_PGO=1 is not supported on Android.

The workaround I have been using is to submit a generate-profile-android-aarch64-shippable/opt job to try, download and extract the profdata.tar.xz artefact, then perform a build with the following in my mozconfig:

ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --with-pgo-jarlog="${HOME}/Downloads/profdata/en-US.log"
ac_add_options --with-pgo-profile-path="${HOME}/Downloads/profdata/merged.profdata"

When using MOZ_PGO=1 locally on desktop, the instrumented build and profile generation are performed here. This reuses the same profileserver.py as is used on CI to do the profile generation run. For Android profile generation on CI, however, we use a different script: android_emulator_pgo.py

This was definitely written with running on taskcluster in mind. I have, however, in the past successfully modified it so it can be ran locally: https://github.com/jamienicol/gecko/commit/d7a40d9494360adff03361127a39dc67046d499a. I'm unsure whether that is the right approach to fix this, though.

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Task Configuration' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Task Configuration
You need to log in before you can comment on or make changes to this bug.