Skip to content

Commit dd43464

Browse files
Disable delayed purging in jemalloc
This prevents a source of non-determinism that inhibits comparisons across commits.
1 parent 98f1987 commit dd43464

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

collector/src/rustc-fake.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,14 @@ fn main() {
209209

210210
// With --cache-sim=no and --branch-sim=no, Cachegrind just
211211
// collects instruction counts.
212-
cmd.arg("--tool=cachegrind")
212+
cmd
213+
// We disable jemalloc's delayed purging to eliminate noise
214+
// when benchmarks are around the 10 second mark.
215+
//
216+
// See https://github.com/rust-lang/rust/pull/77162 for some
217+
// further details.
218+
.env("MALLOC_CONF", "dirty_decay_ms:0,muzzy_decay_ms:0")
219+
.arg("--tool=cachegrind")
213220
.arg("--cache-sim=no")
214221
.arg("--branch-sim=no")
215222
.arg("--cachegrind-out-file=cgout")

0 commit comments

Comments
 (0)