Android Rust doesn't support PGO
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: away, Assigned: away)
References
Details
Attachments
(1 file)
Attempting to enable Rust PGO on Android fails with "error[E0463]: can't find crate for profiler_builtins".
froydnj says that Rust would likely need a change analogous to https://github.com/rust-lang/rust/pull/60476 to enable the use of profiling on this target.
Comment 1•4 years ago
|
||
Yes, building Rust with the profiler runtime enabled seems like a necessary (first?) step. Adding --enable-profiler
to https://github.com/rust-lang/rust/blob/master/src/ci/docker/dist-android/Dockerfile should do the trick. We'll have to try if that causes problems with any of the targets in that file. I can r+ if you open a PR.
(In reply to Michael Woerister from comment #1)
We'll have to try if that causes problems with any of the targets in that file.
For someone unfamiliar with Rust CI, could you elaborate on how to do that? Is it a "just land the change and see if bots/people complain" or is it something that is done pre-commit (and if so, how)?
Comment 3•4 years ago
|
||
I think trying to land the change is a good approach. Rust CI tests PRs before it merges them, so we'd see if everything builds without having to go through some kind of local setup.
That would give us a nightly version of rustc
for testing. Enabling PGO support for Android should be uncontroversial.
The profiling runtime is now available starting in rust 1.44 nightly-2020-03-23.
In the few things I tested I didn't see any confident changes, although libxul came out about 1% smaller. IIRC we had trouble noticing perf changes on desktop platforms as well.
Even if the perf is a wash, I still think it would be worthwhile to move android to cross-PGO when the Rust release train advances, in order to avoid this one-off special case in our build system where all shipping builds are cross-PGO except Android.
Rust 1.47 finally ships the necessary profiling libraries for this.
Updated•4 years ago
|
Pushed by dmajor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a406f825eeba Enable Rust PGO for Android r=nalexander
Comment 8•4 years ago
|
||
bugherder |
Description
•