What Is gprof?


The gprof utility is the GNU profiler, a tool that identifies how much time is spent in a function of an operating program. The GNU profiler also identifies which functions were called by a given function. Similar to the gcov utility (the topic of Chapter 7, Coverage Testing with GNU gcov ), the compiler introduces profiling code into the target image, which generates a statistics file upon execution. This file ( gmon.out ) contains histogram records, call-graph arc records, and basic-block execution records that illustrate the execution profile of an application. When read by the gprof utility, the performance behavior of the application can be readily understood .

We ll discuss use of the gprof utility bundled with version 3.2.2 of the GNU compiler tool chain.




GNU/Linux Application Programming
GNU/Linux Application Programming (Programming Series)
ISBN: 1584505680
EAN: 2147483647
Year: 2006
Pages: 203
Authors: M. Tim Jones

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net