about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2019-10-14 10:34:21 +0200
committerMichael Woerister <michaelwoerister@posteo>2019-10-14 10:34:21 +0200
commitf81b1548ddf886449d8ea95f82b56274b60fbac7 (patch)
tree41a397a5729a4a99207b455a3d6226ca0174f5fe /src/doc
parentd28a9c38fe14396e86ae274c7847e20ee0f78ca9 (diff)
downloadrust-f81b1548ddf886449d8ea95f82b56274b60fbac7.tar.gz
rust-f81b1548ddf886449d8ea95f82b56274b60fbac7.zip
Add troubleshooting section to PGO chapter in rustc book.
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustc/src/profile-guided-optimization.md11
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