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
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.
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.
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.
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.
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?
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.
"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.
Gprof2Dot by jrfonseca is a tool that converts the output of many profilers, amongst which gprof, into a dot graph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With