Re: RFC: changing Cachegrind default to `--cache-sim=no`

David Faure <[email protected]> Tue, 04 Apr 2023 12:49:16 +0200
Newsgroups gmane.comp.debugging.valgrind
Organization KDE
Message-ID <2036617.9BOoRxHtEJ@asterixp15>
On mardi 4 avril 2023 12:11:18 CEST Nicholas Nethercote wrote:
> On Tue, 4 Apr 2023 at 19:24, David Faure <[email protected]> wrote:
> > But then, with no cache simulation and no call stacks, what's left in
> > `cachegrind --cache-sim=no`?
> 
> From the email that started this thread:
> 
> If you run with `--cache-sim=no` then the cache simulation is disabled and
> > you just get one event: Ir. (This is "instruction cache reads", which is
> > equivalent to "instructions executed".)

Ah, right, sorry.

So to summarize the big picture:
cachegrind -> instructions count, without call stacks, useful for overall numbers or with cg_annotate
callgrind -> instructions count, with call stacks, best viewed in kcachegrind


I wish those two could do cycles and not just instructions, but I guess this requires a good cache simulator again, back to square one ;)
(perf does cycles, but doesn't give exact number of method calls, that's one benefit of cachegrind/callgrind)

-- 
David Faure, [email protected], http://www.davidfaure.fr
Working on KDE Frameworks 5