Skip to content

Commit 778a590

Browse files
committed
Update cargo-llvm-lines version and CI checks
An issue has been fixed in `cargo-llvm-lines` 0.4.12 which would cause us to fail whenever profiling a crate which had any crate dependencies. Update to 0.4.12 and add a CI check that profiles a crate with dependencies to exercise this case. The issue was that we would invoke a particular `cargo` executable and `cargo-llvm-lines` would invoke a different one. This would cause us to try to build the crate's dependencies a second time with the different `cargo`. The `EXPECT_ONLY_WRAPPED_RUSTC` check would detect this case and produce an error.
1 parent b3b52c5 commit 778a590

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
- name: Install profilers
118118
run: |
119119
sudo apt install -y valgrind
120-
cargo install --version 0.4.6 cargo-llvm-lines
120+
cargo install --version 0.4.12 cargo-llvm-lines
121121
122122
- name: Configure environment
123123
run: |

ci/check-profiling.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,21 @@ test -f results/eprintln-Test-helloworld-Check-Full
107107
test ! -s results/eprintln-Test-helloworld-Check-Full
108108

109109
# llvm-lines. `Debug` not `Check` because it doesn't support `Check` builds.
110+
# Including both `helloworld` and `futures` benchmarks, as they exercise the
111+
# zero dependency and the greater than zero dependency cases, respectively, the
112+
# latter of which has broken before.
110113
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
111114
cargo run -p collector --bin collector -- \
112115
profile_local llvm-lines $bindir/rustc Test \
113116
--builds Debug \
114117
--cargo $bindir/cargo \
115-
--include helloworld \
118+
--include helloworld,futures \
116119
--runs Full
117120
test -f results/ll-Test-helloworld-Debug-Full
118121
grep -q "Lines.*Copies.*Function name" results/ll-Test-helloworld-Debug-Full
122+
test -f results/ll-Test-futures-Debug-Full
123+
grep -q "Lines.*Copies.*Function name" results/ll-Test-futures-Debug-Full
124+
119125

120126
#----------------------------------------------------------------------------
121127
# Test option handling

0 commit comments

Comments
 (0)