Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get a graphical representation of gprof results?

Tags:

bash

gprof

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

like image 940
Open the way Avatar asked Mar 13 '10 16:03

Open the way


People also ask

How does gprof work?

Gprof works by automatically instrumenting your code during compilation, and then sampling the application's program counter during execution. Sampling data is saved in a file, typically named gmon. out, which can then be read by the gprof command.

What is a GMON out file?

The `gmon. out' file is written in the program's current working directory at the time it exits. This means that if your program calls chdir , the `gmon. out' file will be left in the last directory your program chdir 'd to.

How do I know if gprof is installed?

To check that gprof is installed properly, execute the gprof command and it should give some error like 'a. out: No such file or directory'. Assuming that the compiler being used it gcc or cc, compile your code with the option '-pg' so that the executable includes extra code for profiling purposes.

What is a graphical representation?

A graphical representation is a visual representation of data statistics-based results using graphs, plots, and charts. This kind of representation is more effective in understanding and comparing data than seen in a tabular form.

Why is it better to represent data in graphical format?

It’s always better to represent data in graphical format. Even in Practical Evidence and Surveys, scientists have found that the restoration and understanding of any information is better when it is available in form of visuals as Human beings process data better in visual form than any other form. Does it increase the ability 2 times or 3 times?

Is chart a graphical representation of data?

Yes, these graphical representations are numerical data that has been accumulated through various surveys and observations. The method of presenting these numerical data is called a chart. There are different kinds of charts such as a pie chart, bar graph, line graph, etc, that help in clearly showcasing the data.

Why is it important to present information graphically?

"People 'consume' information in different ways and presenting information graphically can help clarify evaluation results. While some find text easy to digest, others find that graphics - bar charts, pie charts, illustrations and photographs - can simplify complex information, emphasize key points and create a picture of data.


1 Answers

Gprof2Dot by jrfonseca is a tool that converts the output of many profilers, amongst which gprof, into a dot graph.

like image 187
msw Avatar answered Sep 21 '22 19:09

msw