]> git.lizzy.rs Git - rust.git/blobdiff - src/ci/pgo.sh
Rollup merge of #97627 - lcnr:comment-tick, r=Dylan-DPC
[rust.git] / src / ci / pgo.sh
index 691d1282cf499ceae3f17bc288c0d44a77c83c23..9b727947f6ad1c9d570a265926eefa2c77fb4b1f 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# ignore-tidy-linelength
 
 set -euxo pipefail
 
@@ -82,8 +83,12 @@ python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
 
 # Here we're profiling the `rustc` frontend, so we also include `Check`.
 # The benchmark set includes various stress tests that put the frontend under pressure.
-gather_profiles "Check,Debug,Opt" "All" \
-  "externs,ctfe-stress-4,cargo-0.60.0,token-stream-stress,match-stress,tuple-stress"
+# The profile data is written into a single filepath that is being repeatedly merged when each
+# rustc invocation ends. Empirically, this can result in some profiling data being lost.
+# That's why we override the profile path to include the PID. This will produce many more profiling
+# files, but the resulting profile will produce a slightly faster rustc binary.
+LLVM_PROFILE_FILE=/tmp/rustc-pgo/default_%m_%p.profraw gather_profiles "Check,Debug,Opt" "All" \
+"externs,ctfe-stress-5,cargo-0.60.0,token-stream-stress,match-stress,tuple-stress,diesel-1.4.8,bitmaps-3.1.0"
 
 # Merge the profile data we gathered
 ./build/$PGO_HOST/llvm/bin/llvm-profdata \