tags:

views:

251

answers:

2

Hi,

I am interested in getting the profiling of some number crunching program. I compiled it with -g and -pg options and linked it and got it gmon.out. After reading the info (plain text) it looks a bit ugly. I wonder if there are some open source tools for getting a graphical representation of the 10 functions where the program spends the most of the time as well as a flux diagram.

Thanks

+4  A: 

Gprof2Dot

msw
Wow this looks like a great tool... thanks for the link! Great answer
Sam Post
thaks a lot! Now just a short question. How can I get a graphical representation now of the control flow of the program. i mean which functions are called and in which order, and which precent is spent on each of them. thanjks
Werner
@Werner: Does not the call graph of Gprof2Dot do that? If not I must be misunderstanding you. Or: http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Frequently_Asked_Questions
msw
+1  A: 

Not quite an answer to your question, but maybe a solution to your problem: I switched from gprof to valgrind's callgrind tool, primarily because of the incredible graphical tool kcachegrind, which you can use to visualize the results. It's interactive, so you can zoom in on interesting parts of the call graph.

Gprof2dot works with callgrind as well as gprof.

Norman Ramsey