Add troubleshooting section to PGO chapter in rustc book.
This commit is contained in:
parent
d28a9c38fe
commit
f81b1548dd
1 changed files with 11 additions and 0 deletions
|
@ -125,6 +125,17 @@ RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata" \
|
||||||
cargo build --release --target=x86_64-unknown-linux-gnu
|
cargo build --release --target=x86_64-unknown-linux-gnu
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Troubleshooting
|
||||||
|
|
||||||
|
- It is recommended to pass `-Cllvm-args=-pgo-warn-missing-function` during the
|
||||||
|
`-Cprofile-use` phase. LLVM by default does not warn if it cannot find
|
||||||
|
profiling data for a given function. Enabling this warning will make it
|
||||||
|
easier to spot errors in your setup.
|
||||||
|
|
||||||
|
- There is a [known issue](https://github.com/rust-lang/cargo/issues/7416) in
|
||||||
|
Cargo prior to version 1.39 that will prevent PGO from working correctly. Be
|
||||||
|
sure to use Cargo 1.39 or newer when doing PGO.
|
||||||
|
|
||||||
## Further Reading
|
## Further Reading
|
||||||
|
|
||||||
`rustc`'s PGO support relies entirely on LLVM's implementation of the feature
|
`rustc`'s PGO support relies entirely on LLVM's implementation of the feature
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue