File tree 4 files changed +24
-7
lines changed
4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ jobs:
110
110
toolchain : beta
111
111
override : true
112
112
113
+ - name : Install profilers
114
+ run : |
115
+ cargo install cargo-llvm-lines
116
+
113
117
- name : Configure environment
114
118
run : |
115
119
sudo apt-get update
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- set -e -x;
3
+ set -eE -x;
4
4
5
5
bash -c " while true; do sleep 30; echo \$ (date) - running ...; done" &
6
6
PING_LOOP_PID=$!
7
- trap ' kill $PING_LOOP_PID' ERR
7
+ trap ' kill $PING_LOOP_PID' ERR 1 2 3 6
8
8
9
9
# Install a toolchain.
10
10
RUST_BACKTRACE=1 RUST_LOG=collector_raw_cargo=trace,collector=debug,rust_sysroot=debug \
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
#
3
- # This script is basically just a smoke test. It only tests `eprintln`
4
- # profiling because setting up the other profilers is something of a hassle .
3
+ # This script only tests some of the profilers at the moment. More coverage
4
+ # would be nice .
5
5
6
- set -e -x;
6
+ set -eE -x;
7
7
8
8
bash -c " while true; do sleep 30; echo \$ (date) - running ...; done" &
9
9
PING_LOOP_PID=$!
10
- trap ' kill $PING_LOOP_PID' ERR
10
+ trap ' kill $PING_LOOP_PID' ERR 1 2 3 6
11
11
12
12
# Install a toolchain.
13
13
RUST_BACKTRACE=1 RUST_LOG=collector_raw_cargo=trace,collector=debug,rust_sysroot=debug \
@@ -28,5 +28,18 @@ test -f results/eprintln-Test-helloworld-Debug-Full
28
28
test -f results/eprintln-Test-helloworld-Opt-Full
29
29
test ! -e results/eprintln-Test-helloworld-Doc-Full
30
30
31
+ # Profile with llvm-lines.
32
+ RUST_BACKTRACE=1 RUST_LOG=collector_raw_cargo=trace,collector=debug,rust_sysroot=debug \
33
+ cargo run -p collector --bin collector -- \
34
+ profile_local llvm-lines $bindir /rustc Test \
35
+ --builds Debug \
36
+ --cargo $bindir /cargo \
37
+ --include futures \
38
+ --runs Full
39
+
40
+ # Check the output is present and looks something like it should.
41
+ test -f results/ll-Test-futures-Debug-Full
42
+ grep -q " Lines.*Copies.*Function name" results/ll-Test-futures-Debug-Full
43
+
31
44
kill $PING_LOOP_PID
32
45
exit 0
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ impl Profiler {
172
172
}
173
173
}
174
174
Profiler :: LlvmLines => match build_kind {
175
- BuildKind :: Debug | BuildKind :: Opt => Some ( "rustc " ) ,
175
+ BuildKind :: Debug | BuildKind :: Opt => Some ( "llvm-lines " ) ,
176
176
BuildKind :: Check | BuildKind :: Doc => None ,
177
177
} ,
178
178
}
You can’t perform that action at this time.
0 commit comments