diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-10-15 16:07:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-15 16:07:55 -0700 |
| commit | 2dac8b9176c2c547d0708b53ed6c174cf6cf10b9 (patch) | |
| tree | 1944abcafaf893d07772f19f6d7d131a037c00f9 | |
| parent | bbcf66a4a177c1756d5b6845933e6cb06aa21b2c (diff) | |
| parent | f81b1548ddf886449d8ea95f82b56274b60fbac7 (diff) | |
| download | rust-2dac8b9176c2c547d0708b53ed6c174cf6cf10b9.tar.gz rust-2dac8b9176c2c547d0708b53ed6c174cf6cf10b9.zip | |
Rollup merge of #65402 - michaelwoerister:pgo-troubleshooting-docs, r=alexcrichton
Add troubleshooting section to PGO chapter in rustc book. - Adds a note about using `-pgo-warn-missing-function` in order to spot mistakes in PGO setup. - Mentions cargo symbol name issue fixed in 1.39. Nominating for backport. r? @alexcrichton
| -rw-r--r-- | src/doc/rustc/src/profile-guided-optimization.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/doc/rustc/src/profile-guided-optimization.md b/src/doc/rustc/src/profile-guided-optimization.md index 38be07a6440..d066f4a9cf5 100644 --- a/src/doc/rustc/src/profile-guided-optimization.md +++ b/src/doc/rustc/src/profile-guided-optimization.md @@ -125,6 +125,17 @@ RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata" \ 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 `rustc`'s PGO support relies entirely on LLVM's implementation of the feature |
