Open
Description
- Build dist-android with --enable-profiler #70054 added
profiler_builtins
for all Android targets - Profile Guided Optimization (PGO) not working on aarch64 #57257 added support for the profiler builtins for x86_64-unknown-linux-gnu targets.
- build dist-aarch64-linux with --enable-profiler #60476 added the profiler builtins for aarch64-unknown-linux-gnu.
This indicates to me that it should be practical to enable the profiler feature for -musl
targets on ARM and Intel targets, and we should do so. At a minimum, the following very common targets should have the profiler feature enabled:
- x86_64-unknown-linux-musl; done in Profile Guided Optimization (PGO) not working on aarch64 #57257aarch64-unknown-linux-musl; done in Enable sanitizers and profiler for aarch64-unknown-linux-musl #111575arm-unknown-linux-musleabihfarmv7-unknown-linux-musleabihfi686-unknown-linux-musl
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
briansmith commentedon Nov 30, 2020
profiler_builtins
#79640kobehz commentedon Jun 3, 2021
I have the same problem for target aarch64-unknown-linux-musl.
What time do you expect to enable the the profiler feature for these targets?
Or what can I do myself to solve the problem?
briansmith commentedon Jun 3, 2021
I think there's not much stopping us from making a PR to rust-lang/rust that copies https://github.com/rust-lang/rust/pull/76035/files for the other musl targets.
mati865 commentedon Jun 3, 2021
This might be harder than it sounds since only x86_64 musl target is natively built. Others are cross compiled from Linux GNU target.
But trying to do what Brian said won't hurt.
clarfonthey commentedon Jul 13, 2022
Ran into something similar to this after trying to test some code via
cross
. If I'm understanding correctly, all tier-2 and below targets don't have support forprofiler_builtins
. That includes not only the MUSL targets, but targets for architectures other than x86_64, aarch64, and i686.kobehz commentedon Jul 13, 2022
-Zinstrument-coverage
) #79121tmandry commentedon Jul 13, 2022
It definitely works for Fuchsia (Tier 2) since we use it there. But we also build our own toolchain. This is probably (at least in part) an issue with the way the official distribution for those targets is configured and built.
aarch64-unknown-linux-musl
rust-lang/rustup#3095briansmith commentedon Oct 31, 2023
https://github.com/rust-lang/rust/pull/111575/files added profiler support by just adding
--enable-profiler
toENV RUST_CONFIGURE_ARGS
. So I think it isn't as hard as we're worried about.5 remaining items