GNU gprof

The GNU profiler tool gprof helps you analyze where your program spent its time and which functions called which other functions while it was executing. This information can show you which pieces of your program are slower than you expected, and might be candidates for rewriting to make your program execute faster. It can also tell you which functions are being called more or less often than you expected. This may help you spot bugs that had otherwise been unnoticed.

Profiling has several steps:

  • You must compile and link your program with profiling enabled. See Compiling.
  • You must execute your program to generate a profile data file. See Executing.
  • You must run gprof to analyze the profile data. See Invoking.
 
version 2.20.51.0.2
license  GNU General Public License (GPL)
website GNU GDB
help  docs, tutorial