@@ -13,33 +13,62 @@ trap 'kill $PING_LOOP_PID' ERR 1 2 3 6
13
13
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
14
14
bindir=` cargo run -p collector --bin collector install_next`
15
15
16
- # Profile with eprintln.
16
+ # ----------------------------------------------------------------------------
17
+ # Test the profilers
18
+ # ----------------------------------------------------------------------------
19
+
20
+ # time-passes: TODO
21
+
22
+ # perf-record: TODO
23
+
24
+ # oprofile: TODO
25
+
26
+ # Cachegrind.
17
27
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
18
28
cargo run -p collector --bin collector -- \
19
- profile_local eprintln $bindir /rustc Test \
29
+ profile_local cachegrind $bindir /rustc Test \
30
+ --builds Check \
20
31
--cargo $bindir /cargo \
21
32
--include helloworld \
22
33
--runs Full
34
+ valgrind --version # njn: temp
35
+ head -100 results/cgout-Test-helloworld-Check-Full # njn: temp
36
+ test -f results/cgout-Test-helloworld-Check-Full
37
+ grep -q " events: Ir" results/cgout-Test-helloworld-Check-Full
38
+ head -100 results/cgann-Test-helloworld-Check-Full # njn: temp
39
+ test -f results/cgann-Test-helloworld-Check-Full
40
+ grep -q " PROGRAM TOTALS" results/cgann-Test-helloworld-Check-Full
41
+
42
+ # Callgrind: TODO
43
+
44
+ # DHAT: TODO
45
+
46
+ # Massif: TODO
23
47
24
- # Check that Check/Debug/Opt files are present, and that Doc files aren't
25
- # present, becuase they're not done by default.
48
+ # njn: move the check/debug/opt checking later
49
+ # eprintln. Note: Check/Debug/Opt files must be present, and Doc files must not
50
+ # be present, because they're not collected by default.
51
+ RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
52
+ cargo run -p collector --bin collector -- \
53
+ profile_local eprintln $bindir /rustc Test \
54
+ --cargo $bindir /cargo \
55
+ --include helloworld \
56
+ --runs Full
26
57
test -f results/eprintln-Test-helloworld-Check-Full
27
58
test -f results/eprintln-Test-helloworld-Debug-Full
28
59
test -f results/eprintln-Test-helloworld-Opt-Full
29
60
test ! -e results/eprintln-Test-helloworld-Doc-Full
30
61
31
- # Profile with llvm-lines.
62
+ # llvm-lines.
32
63
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
33
64
cargo run -p collector --bin collector -- \
34
65
profile_local llvm-lines $bindir /rustc Test \
35
66
--builds Debug \
36
67
--cargo $bindir /cargo \
37
- --include futures \
68
+ --include helloworld \
38
69
--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
70
+ test -f results/ll-Test-helloworld-Debug-Full
71
+ grep -q " Lines.*Copies.*Function name" results/ll-Test-helloworld-Debug-Full
43
72
44
73
kill $PING_LOOP_PID
45
74
exit 0
0 commit comments