I tried to find a related question but all previous questions are about profilers for native c++ in windows. I googled a while and learned about gprof, but the output of gprof actually contained lot of obscure internal functions. Is there a good opensource c++ profiler with good documentation?
+2
A:
Valgrind
I totally recommend this http://en.wikipedia.org/wiki/Valgrind
iamslash
2009-12-27 03:52:17
can you please suggest a good gprof tutorial.
Algorist
2009-12-27 04:06:46
+3
A:
Don't use gprof, for the reasons given here.
What you need are stackshots, explained here. One way to take stackshots is the pstack utility. Another way is to use "Pause" or ctrl-break under the debugger. Also lsstack, if you can get a copy.
If you want to spend money, RotateRight makes a nice tool based on stack sampling called Zoom.
Mike Dunlavey
2009-12-27 04:10:17
A:
If you don't mind the KDE library dependencies, KCachegrind is very useful with the added visualization. It depends on Callgrind and Valgrind, as one could have guessed, so no special compiler flags required during compile-time.
okun
2009-12-27 20:38:28