Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile Guided Optimization (PGO) not working on aarch64 #57257

Closed
robsmith11 opened this issue Jan 2, 2019 · 2 comments · Fixed by #60476
Closed

Profile Guided Optimization (PGO) not working on aarch64 #57257

robsmith11 opened this issue Jan 2, 2019 · 2 comments · Fixed by #60476
Labels
O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state

Comments

@robsmith11
Copy link

Using the latest nightly on aarch64-unknown-linux-gnu installed with rustup, I am getting the following error when I attempt to run any crate with PGO:

$ RUSTFLAGS="-Z pgo-gen=/tmp/prof.data" cargo run                                                                   Compiling play v0.1.0 (/home/me/play)
error[E0463]: can't find crate for `profiler_builtins`                                                                  
error: aborting due to previous error
@jonas-schievink jonas-schievink added the O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state label Jan 27, 2019
@ghost
Copy link

ghost commented Mar 22, 2019

Facing the same issue. I'm trying to compile rustc with pgo.

@froydnj
Copy link
Contributor

froydnj commented Apr 30, 2019

It looks like aarch64-unknown-linux-gnu is built without --enable-profiling.

froydnj added a commit to froydnj/rust that referenced this issue May 2, 2019
This change should enable PGO to be used for aarch64-linux.

Fixes rust-lang#57257.
Centril added a commit to Centril/rust that referenced this issue May 3, 2019
…ichton

build dist-aarch64-linux with --enable-profiler

This change should enable PGO to be used for aarch64-linux.

Fixes rust-lang#57257.
Centril added a commit to Centril/rust that referenced this issue May 3, 2019
…ichton

build dist-aarch64-linux with --enable-profiler

This change should enable PGO to be used for aarch64-linux.

Fixes rust-lang#57257.
bors added a commit that referenced this issue May 5, 2019
build dist-aarch64-linux with --enable-profiler

This change should enable PGO to be used for aarch64-linux.

Fixes #57257.
tiagolam added a commit to tiagolam/rust that referenced this issue Aug 28, 2020
Trying to build a Rust project with `-Zprofile` for target
x86_64-unknown-linux-musl using rustc 1.46.0-nightly (346aec9
2020-07-11), installed with rustup, results in the following error.
```
        export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"export CARGO_INCREMENTAL=0$ cargo build --target=x86_64-unknown-linux-muslCompiling hello_world v0.1.0 (…)error[E0463]: can't find crate for `profiler_builtins`
        |
         = note: the compiler may have been built without the profiler runtime

        error: aborting due to previous error

        For more information about this error, try `rustc --explain E0463`.error: could not compile `hello_world`.

        To learn more, run the command again with --verbose.
```

`-Zprofile` is required here to enable grcov profiling.

This is similar in nature to issue
rust-lang#57257, which has been fixed in
asimilar way at rust-lang#60476 .

A fix for Android has also landed not long ago:
rust-lang#70054 .

Signed-off-by: Tiago Lam <tiagol@hadean.com>
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 28, 2020
Build dist-x86_64-musl with --enable-profiler.

Trying to build a Rust project with `-Zprofile` for target
x86_64-unknown-linux-musl using rustc 1.46.0-nightly (346aec9
2020-07-11), installed with rustup, results in the following error.
```
        export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"export CARGO_INCREMENTAL=0$ cargo build --target=x86_64-unknown-linux-muslCompiling hello_world v0.1.0 (…)error[E0463]: can't find crate for `profiler_builtins`
        |
         = note: the compiler may have been built without the profiler runtime

        error: aborting due to previous error

        For more information about this error, try `rustc --explain E0463`.error: could not compile `hello_world`.

        To learn more, run the command again with --verbose.
```

`-Zprofile` is required here to enable grcov profiling.

This is similar in nature to issue
rust-lang#57257, which has been fixed in
asimilar way at rust-lang#60476 .

A fix for Android has also landed not long ago:
rust-lang#70054 .

Signed-off-by: Tiago Lam <tiagol@hadean.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants