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)?
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
Use SSHFS to mount the remote directory that you're working in (see e.g. SSHFS installation instructions for Ubuntu).
Then just ssh in and run valgrind --tool=callgrind
with whatever options you want in the remote directory. Since you have that directory mounted locally, it's as easy to open the data files with KCacheGrind as if you were debugging locally.
webgrind is a web-frontend written in PHP that parses the output of XDebug (which uses the same format as callgrind).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With