Skip to content

Commit 7156fb4

Browse files
committed
cachegrind: ignore leading path to the benchmarked rustls checkout
For each PR benchmark we create two checkouts of the rustls repository, each one in its own directory (e.g. `/tmp/.tmpZE2KDR` and `/tmp/.tmpq8vPPQ`). As a consequence, when comparing the cachegrind output the diff tool fails to correlate the functions of both runs. The result is a totally useless diff, where all instructions from the baseline are considered to have disappeared and all instructions from the candidate to have appeared (for an example, see https://bench.rustls.dev/comparisons/371463d8129f4f0541e38063358ec2ad4428a44a:453cf7968b251b22db5bcadebefe3ea37125b630/cachegrind-diff/handshake_tickets_aws_lc_rs_1.2_rsa_aes_server) This commit tells cachegrind to ignore the leading path (everything up to `target/release/build`), restoring the ability to track individual rustls functions.
1 parent 3858d3b commit 7156fb4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ci-bench-runner/src/job/bench_pr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,8 @@ pub fn cachegrind_diff(job_output_path: &Path, scenario: &str) -> anyhow::Result
628628
// _ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash17hc60392f3f3eac4b2E.llvm.9716880419886440089 ->
629629
// _ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehashE
630630
.arg("--mod-funcname=s/17h[0-9a-f]+E\\.llvm\\.\\d+/E/")
631+
// remove the leading path, which is unique for each checkout of the repository (we replace it by `rustls`)
632+
.arg("--mod-filename=s/.+\\/(target\\/release\\/build.+)/rustls\\/\\1/")
631633
.arg(baseline_cachegrind_file_path)
632634
.arg(candidate_cachegrind_file_path)
633635
.stdout(Stdio::from(diff_file))

0 commit comments

Comments
 (0)