about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-09 07:53:34 +0000
committerbors <bors@rust-lang.org>2022-04-09 07:53:34 +0000
commit399dd8049d4b27329350937e3e17077205bdc0bf (patch)
tree99ea83b59ab4531a5123cc4f0df163359fd7dd7a
parent4bb685e4714a2b310774f45c3d023d1743de8bd0 (diff)
parent49efa23d70c12c9a670b262a1fb717a12cea7489 (diff)
downloadrust-399dd8049d4b27329350937e3e17077205bdc0bf.tar.gz
rust-399dd8049d4b27329350937e3e17077205bdc0bf.zip
Auto merge of #95724 - Kobzol:ci-update-rustc-perf, r=nnethercote
CI: update `rustc-perf` version used in CI and also the corresponding PGO benchmarks

The old version was from May 2021. The `rustc-perf` benchmarks have seen a significant overhaul recently, so let's see if the new benchmarks can improve PGO performance.
-rw-r--r--src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile3
-rwxr-xr-xsrc/ci/pgo.sh19
2 files changed, 14 insertions, 8 deletions
diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
index efc83c6ccab..5e6716baed6 100644
--- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
@@ -98,7 +98,8 @@ COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/
 RUN ./build-clang.sh
 ENV CC=clang CXX=clang++
 
-ENV PERF_COMMIT 1e19fc4c6168d2f7596e512f42f358f245d8f09d
+# rustc-perf version from 2022-04-05
+ENV PERF_COMMIT 04fccd80396f954b339c366e30221f4bd52c5e03
 RUN curl -LS -o perf.zip https://github.com/rust-lang/rustc-perf/archive/$PERF_COMMIT.zip && \
     unzip perf.zip && \
     mv rustc-perf-$PERF_COMMIT rustc-perf && \
diff --git a/src/ci/pgo.sh b/src/ci/pgo.sh
index 88a03c05d9f..689e6a11d61 100755
--- a/src/ci/pgo.sh
+++ b/src/ci/pgo.sh
@@ -3,8 +3,8 @@
 set -euxo pipefail
 
 # Compile several crates to gather execution PGO profiles.
-# Arg0 => builds (Debug, Opt)
-# Arg1 => runs (Full, IncrFull, All)
+# Arg0 => profiles (Debug, Opt)
+# Arg1 => scenarios (Full, IncrFull, All)
 # Arg2 => crates (syn, cargo, ...)
 gather_profiles () {
   cd /checkout/obj
@@ -27,10 +27,10 @@ gather_profiles () {
           profile_local \
           eprintln \
           /checkout/obj/build/$PGO_HOST/stage2/bin/rustc \
-          Test \
-          --builds $1 \
+          --id Test \
+          --profiles $1 \
           --cargo /checkout/obj/build/$PGO_HOST/stage0/bin/cargo \
-          --runs $2 \
+          --scenarios $2 \
           --include $3
 
   cd /checkout/obj
@@ -64,7 +64,10 @@ RUSTC=/checkout/obj/build/$PGO_HOST/stage0/bin/rustc \
 RUSTC_BOOTSTRAP=1 \
 /checkout/obj/build/$PGO_HOST/stage0/bin/cargo build -p collector
 
-gather_profiles "Debug,Opt" "Full" "syn,cargo,serde,ripgrep,regex,clap-rs,hyper-2"
+# Here we're profiling LLVM, so we only care about `Debug` and `Opt`, because we want to stress
+# codegen. We also profile some of the most prolific crates.
+gather_profiles "Debug,Opt" "Full" \
+"syn-1.0.89,cargo-0.60.0,serde-1.0.136,ripgrep-13.0.0,regex-1.5.5,clap-3.1.6,hyper-0.14.18"
 
 # Merge the profile data we gathered for LLVM
 # Note that this uses the profdata from the clang we used to build LLVM,
@@ -83,8 +86,10 @@ python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
     --stage 2 library/std \
     --rust-profile-generate=/tmp/rustc-pgo
 
+# 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,inflate,cargo,token-stream-stress,match-stress-enum"
+  "externs,ctfe-stress-4,cargo-0.60.0,token-stream-stress,match-stress,tuple-stress"
 
 # Merge the profile data we gathered
 ./build/$PGO_HOST/llvm/bin/llvm-profdata \