iai icon indicating copy to clipboard operation
iai copied to clipboard

Use Callgrind instead of Cachegrind

Open madsmtm opened this issue 2 years ago • 1 comments

Quick draft, willing to put the work in to making this PR prettier if this transition desired, @bheisler?

Using Callgrind makes the output even more stable, since we no longer need to do an initial calibration run, so any setup that the OS linker has to perform is never included in the output. This is especially important when using valgrind on macOS (see https://github.com/bheisler/iai/issues/25#issuecomment-1029462079), since the linker does more work at runtime there.

See Callgrind docs for more info.

Could also be part of fixing https://github.com/bheisler/iai/issues/7, https://github.com/bheisler/iai/issues/20 and https://github.com/bheisler/iai/issues/23.

madsmtm avatar Feb 20 '22 00:02 madsmtm

Idea: Use the callgrind crate or similar to send "client requests" to Valgrind instead of the blunt --toggle-collect that this PR uses now.

madsmtm avatar Feb 22 '22 01:02 madsmtm