Open niklasf opened 1 year ago
I think the issue starts with valgrind 3.21.0, starting with this change in that version (from https://valgrind.org/docs/manual/dist.news.html):
--cache-sim=no
is now the default. The cache simulation is old and unlikely to match any real modern machine. This means only theIr
event are gathered by default, but that is by far the most useful event.
So either iai
should add--cache-sim=yes
, or only handle the Ir
(instructions executed) event as the other ones may not be that useful.
Oops, 3.21.0 is the first "bad" version, indeed. Looks like I messed up the downgrade on my first attempt.
Here's a PR that fixes it by adding that argument. Not sure the ramifications of still using the cache simulation, but I figured this would be better than simply removing all of the other statistics.
If you want to use my fork that re-enables the outdated cache simulation:
iai = { git = "https://github.com/sigaloid/iai", rev = "d56a597" }
If you want to use my fork that disables the outdated cache simulation (as mentioned, valgrind has deemed it outdated and not realistic):
iai = { git = "https://github.com/sigaloid/iai", rev = "6c83e942" }
This will reduce the stats you get to one number: Instruction count.
I can confirm that the cache simulation is very inaccurate. Reducing memory use has a much higher impact in actual benchmarks than in iai. I wonder if there is another tool that is actually meant for simulating performance.
Works again after downgrading to valgrind 3.19.0.