views:

164

answers:

3

I'm searching for a "good enough" gprof output visualizer. Kprof seems unmaintained.

Profiling is an important part of (speed sensitive) applications development, but I fail to find support on the major Linux IDEs.

Any suggestions ?

+1  A: 

I recommend using KCachegrind to vizualize the logs given by oprofile.

drhirsch
It does appear, if you know what to look for, that KCachegrind can get line and instruction level inclusive costs. So they're getting there, and that's good.
Mike Dunlavey
+1  A: 

This is what I tell everyone. It's unusual, quick-and-dirty, but really works.

Mike Dunlavey
Oprofile does exactly the same if you disable the performance monitor registers, or on a arch which doesn't have some.
drhirsch
@drhirsch: I just looked at the on-line doc for Oprofile. From what I could tell, yes it takes stack samples, but then it appears to fall into the usual trap. It won't let you see them (that I can tell)! Rather it 1) summarizes at the function (not statement) level, and 2) assumes the call-graph with measurement is what you need. The key point of taking stackshots is: don't summarize (summaries lose information). Instead, actually look at them. And, you don't need a lot if they are taken when it is being slow.
Mike Dunlavey
... As an example: check out the comments on this link. The user took 4 samples and got a 7x speedup. http://stackoverflow.com/questions/890222/analyzing-code-for-efficiency/893272#893272
Mike Dunlavey
No, it does sum up at the statement level. http://oprofile.sourceforge.net/examples/ (at the end) You can choose to get a output which is source intermixed with profile data. But I agree with you partly, manual stack sampling may be quicker sometimes and its guaranteed to be dirty always :-) If you have some really bogus code, you will likely find out where the problem is even with only a few samples. And I have to admit, I have used it sometimes. But if some finetuning is required, I would rather not recommend this.
drhirsch
@drhirsch: I won't debate the "dirty" part (of which I'm not ashamed :-). Thanks for your input.
Mike Dunlavey
A: 

Probably not what you're looking for, but for me, gprof with an editor with decent search does the job. Are you looking for in what case the top X functions are called so you can optimise them or do you want a nice call-graph of your application?

stefaanv