Console alternative of kcachegrind?

callgrind, console, kcachegrind, linux

Solution

You can get basic information and annotations from callgrind output file (created by `valgrind --tool=callgrind`) with the command-line utility `callgrind_annotate`. (manual page section in docs). For files, generated by cachegrind (`valgrind --tool=cachegrind`), you can use a `cg_annotate` (section in docs). These utilities are build by default with valgrind itself.

Another way is to copy program and cache/callgrind output files to your machine and then analyze them with local kcachegrind as usual. But this way it can be difficult if your machine have no unix but windows or you running on incompatible arch (kcachegrind can call local `objdump` to get information about program).

I also want to recommend command line options to valgrind:

 valgrind --tool=cachegrind --branch-sim=yes 
 valgrind --tool=callgrind --dump-instr=yes --trace-jump=yes

You can also specify cache sizes for cachegrind with `--I1=32768,8,64 --D1=32768,8,64 --L2=3145728,12,64`

Problem

Kcachegrind rocks and it's of my favorite tools, however from time to time I'm missing the ability to run it in terminal(e.g using ssh) on the remote server. I know it's possible to setup VNC or X-server forwarding but it's quite clumsy while I need something simple. Is there any kcachegrind console alternative(e.g ncurses based)?

Original source