Profiler for g++ programs

J

Jorgen Grahn

I am new to application programming for Linux. Is there any good
(GUI is better) profiler for Linux, except gprof?

What's wrong with gprof?

I am not convinced that a GUI would make interpreting the profiling data
easier. It would show graphs I guess, but I think they would become
hard to read pretty soon, with increasing program size.

If I wanted that, I'd feed gprof output through graphviz ... and a
quick Google search shows that some people already did:

http://www.graphviz.org/Gallery/directed/profile.html
http://www.graphviz.org/Resources.php
http://code.google.com/p/jrfonseca/wiki/Gprof2Dot

/Jorgen
 
C

cr88192

Jorgen Grahn said:
What's wrong with gprof?

I am not convinced that a GUI would make interpreting the profiling data
easier. It would show graphs I guess, but I think they would become
hard to read pretty soon, with increasing program size.

another possibility would be to be able to more conviniently jump around
inside the profiler output.
see the list of functions at the top, select maybe the top-ranking function,
and have a view which jumps to the function in question (so, the callers and
callees can be examined without lots of scrolling, typically in vi), ...

of course, another possibility would be if gprof supported HTML output,
which could accomplish essentially the same thing... (apparently there are
tools to convert grpof output to HTML, but IMO it would only really be
particularly useful if it supported it directly, that or maybe the tool
works like a "gprof wrapper" or such...).
 
K

Keith H Duggar

I am new to application programming for Linux. Is there any good (GUI is better) profiler for Linux, except gprof?

callgrind
oprofile
sysprof

My advice is to master gprof and learn to like it. If you do not
want to instrument then use oprofile. Also text is master of the
universe. Abandon the GUI crutch and embrace text power ;-)

KHD
 
J

Jorgen Grahn

another possibility would be to be able to more conviniently jump around
inside the profiler output.
see the list of functions at the top, select maybe the top-ranking function,
and have a view which jumps to the function in question (so, the callers and
callees can be examined without lots of scrolling, typically in vi), ...

I almost never scroll in my editor -- I search based on the text under
the cursor, or using etags/ctags.

But I admit that I often use pencil and paper when looking at profiler
output. To some people that means I should use a GUI tool :)
of course, another possibility would be if gprof supported HTML output,
which could accomplish essentially the same thing... (apparently there are
tools to convert grpof output to HTML, but IMO it would only really be
particularly useful if it supported it directly, that or maybe the tool
works like a "gprof wrapper" or such...).

Why? Having to type 'gprof foo bar | gprof2html > bar.html' seems
more, not less, useful than 'gprof2html foo bar > bar.html'.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,865
Latest member
AveryHamme

Latest Threads

Top