@@ -665,14 +665,22 @@ fn main_result() -> anyhow::Result<i32> {
665
665
666
666
println ! ( "Profiling {rustc}" ) ;
667
667
let ( toolchain1, suite1) = get_suite ( & rustc, "1" ) ?;
668
- let profile1 = profile_runtime ( profiler. clone ( ) , toolchain1, suite1, & benchmark) ?;
668
+ let profile1 = profile_runtime ( profiler. clone ( ) , & toolchain1, suite1, & benchmark) ?;
669
669
670
670
if let Some ( rustc2) = rustc2 {
671
671
match profiler {
672
672
RuntimeProfiler :: Cachegrind => {
673
673
println ! ( "Profiling {rustc2}" ) ;
674
674
let ( toolchain2, suite2) = get_suite ( & rustc2, "2" ) ?;
675
- let profile2 = profile_runtime ( profiler, toolchain2, suite2, & benchmark) ?;
675
+ let profile2 = profile_runtime ( profiler, & toolchain2, suite2, & benchmark) ?;
676
+
677
+ let output = profile1. parent ( ) . unwrap ( ) . join ( format ! (
678
+ "cgann-diff-{}-{}-{benchmark}" ,
679
+ toolchain1. id, toolchain2. id
680
+ ) ) ;
681
+ cachegrind_diff ( & profile1, & profile2, & output)
682
+ . context ( "Cannot generate Cachegrind diff" ) ?;
683
+ println ! ( "Cachegrind diff stored in `{}`" , output. display( ) ) ;
676
684
}
677
685
}
678
686
} else {
0 commit comments