ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Debugging gems: runtime code profiling in Linux - KCacheGrind

(1/1)

Gothi[c]:
I recently stumbled upon the (so far) best FOSS runtime code profiling tool I ever tried: KCacheGrind

It is really a front-end for the common *nix debugging tool valgrind, but the way it visualizes the data makes the valgrind actually allot more usable.

You can navigate through the call graph tree, go into different levels and subtrees, view how much time was spent in each function, detect memory leaks, bugs, etc,...

A nice addition to my debugging arsenal, I thought I would share ;)

jgpaiva:
Thanks a lot!!
Valgrind can become quite hard to understand, i hope this'll help. It sure does look good  :Thmbsup:

Gothi[c]:
Be sure to read the manual to get the most out of it ;)

to produce the output needed for KCacheGrind, run:

--- ---valgrind --tool=callgrind ./yourprogram

+ any other options you want to pass to valgrind

Then open the produced yourprogram.out.12345 file with KCacheGrind.

tinjaw:
That's a pretty sweet find. Thanks for pointing it out.

Navigation

[0] Message Index

Go to full version