File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -137,21 +137,18 @@ test ! -s results/eprintln-Test-helloworld-Check-Full
137
137
# Including both `helloworld` and `regex-1.5.5` benchmarks, as they exercise the
138
138
# zero dependency and the greater than zero dependency cases, respectively, the
139
139
# latter of which has broken before.
140
- #
141
- # XXX: `regex-1.5.5` is currently excluded because it's failing on CI, even
142
- # though it works locally. #1537 is the issue for this.
143
140
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
144
141
cargo run -p collector --bin collector -- \
145
142
profile_local llvm-lines $bindir /rustc \
146
143
--id Test \
147
144
--profiles Debug \
148
145
--cargo $bindir /cargo \
149
- --include helloworld \
146
+ --include helloworld,regex-1.5.5 \
150
147
--scenarios Full
151
148
test -f results/ll-Test-helloworld-Debug-Full
152
149
grep -q " Lines.*Copies.*Function name" results/ll-Test-helloworld-Debug-Full
153
- # test -f results/ll-Test-regex-1.5.5-Debug-Full
154
- # grep -q "Lines.*Copies.*Function name" results/ll-Test-regex-1.5.5-Debug-Full
150
+ test -f results/ll-Test-regex-1.5.5-Debug-Full
151
+ grep -q " Lines.*Copies.*Function name" results/ll-Test-regex-1.5.5-Debug-Full
155
152
156
153
# llvm-ir. `Debug` not `Check` because it works better that way.
157
154
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ impl PerfTool {
75
75
}
76
76
}
77
77
78
+ /// Should return true if this perf tool calls Cargo "recursively" inside of it.
79
+ /// This is not compatible with a check that is performed to make sure that only the
80
+ /// final rustc is invoked during a benchmark/profiling phase.
81
+ /// See the `EXPECT_ONLY_WRAPPED_RUSTC` environment variable in `rustc-fake`.
82
+ fn calls_cargo_recursively ( & self ) -> bool {
83
+ matches ! ( self , PerfTool :: ProfileTool ( profiler:: Profiler :: LlvmLines ) )
84
+ }
85
+
78
86
fn is_scenario_allowed ( & self , scenario : Scenario ) -> bool {
79
87
use bencher:: Bencher :: * ;
80
88
use profiler:: Profiler :: * ;
@@ -252,7 +260,9 @@ impl<'a> CargoProcess<'a> {
252
260
// If we're using a processor, we expect that only the crate
253
261
// we're interested in benchmarking will be built, not any
254
262
// dependencies.
255
- cmd. env ( "EXPECT_ONLY_WRAPPED_RUSTC" , "1" ) ;
263
+ if !processor. perf_tool ( ) . calls_cargo_recursively ( ) {
264
+ cmd. env ( "EXPECT_ONLY_WRAPPED_RUSTC" , "1" ) ;
265
+ }
256
266
cmd. arg ( "--wrap-rustc-with" ) ;
257
267
cmd. arg ( perf_tool_name) ;
258
268
cmd. args ( & self . rustc_args ) ;
You can’t perform that action at this time.
0 commit comments