@@ -19,6 +19,34 @@ RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc \
19
19
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST /stage2/bin/rustc \
20
20
--edition=2021 --crate-type=lib -Copt-level=3 ../library/core/src/lib.rs
21
21
22
+ cp -r /tmp/rustc-perf ./
23
+ chown -R $( whoami) : ./rustc-perf
24
+ cd rustc-perf
25
+
26
+ # Build the collector ahead of time, which is needed to make sure the rustc-fake
27
+ # binary used by the collector is present.
28
+ RUSTC=/checkout/obj/build/$PGO_HOST /stage0/bin/rustc \
29
+ RUSTC_BOOTSTRAP=1 \
30
+ /checkout/obj/build/$PGO_HOST /stage0/bin/cargo build -p collector
31
+
32
+ # Gather LLVM PGO profiles from real-world crates.
33
+ # Benchmark using profile_local with eprintln, which essentially just means
34
+ # don't actually benchmark -- just make sure we run rustc a bunch of times.
35
+ RUST_LOG=collector=debug \
36
+ RUSTC=/checkout/obj/build/$PGO_HOST /stage0/bin/rustc \
37
+ RUSTC_BOOTSTRAP=1 \
38
+ /checkout/obj/build/$PGO_HOST /stage0/bin/cargo run -p collector --bin collector -- \
39
+ profile_local \
40
+ eprintln \
41
+ /checkout/obj/build/$PGO_HOST /stage2/bin/rustc \
42
+ Test \
43
+ --builds Debug,Opt \
44
+ --cargo /checkout/obj/build/$PGO_HOST /stage0/bin/cargo \
45
+ --runs All \
46
+ --include syn,cargo,serde,ripgrep,regex,clap-rs,hyper-2
47
+
48
+ cd /checkout/obj
49
+
22
50
# Merge the profile data we gathered for LLVM
23
51
# Note that this uses the profdata from the clang we used to build LLVM,
24
52
# which likely has a different version than our in-tree clang.
@@ -42,18 +70,8 @@ RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST/stage2/bin/rustc \
42
70
RUSTC_BOOTSTRAP=1 ./build/$PGO_HOST /stage2/bin/rustc \
43
71
--edition=2021 --crate-type=lib -Copt-level=3 ../library/core/src/lib.rs
44
72
45
- cp -r /tmp/rustc-perf ./
46
- chown -R $( whoami) : ./rustc-perf
47
73
cd rustc-perf
48
74
49
- # Build the collector ahead of time, which is needed to make sure the rustc-fake
50
- # binary used by the collector is present.
51
- RUSTC=/checkout/obj/build/$PGO_HOST /stage0/bin/rustc \
52
- RUSTC_BOOTSTRAP=1 \
53
- /checkout/obj/build/$PGO_HOST /stage0/bin/cargo build -p collector
54
-
55
- # benchmark using profile_local with eprintln, which essentially just means
56
- # don't actually benchmark -- just make sure we run rustc a bunch of times.
57
75
RUST_LOG=collector=debug \
58
76
RUSTC=/checkout/obj/build/$PGO_HOST /stage0/bin/rustc \
59
77
RUSTC_BOOTSTRAP=1 \
0 commit comments