EVERYTHING XIAOMI
Get listed

GNU gprof

GNU gprof is a free, open-source command-line profiler for Linux and self-hosted use.

Place
#23 of 29
Score
5.7
GNU gprof's website

What GNU gprof is

GNU gprof is a free, open-source command-line profiler for Linux and self-hosted use. It analyzes profiling data to show which parts of a program take the most execution time, and supports CPU profiling for C and C++. Reports can include a flat profile, a call graph, and annotated source output. Programs need to be compiled and linked with profiling enabled, typically using the -pg compiler option. When a profiled program exits normally, it writes data to gmon.out; gprof can also combine statistics from multiple profile files.

Its timing does not include periods when a program is not running, such as time limited by I/O or swapping. Profiling adds function-call overhead, which can create artificial hot spots. The -l line-profiling feature works only with programs built by older GCC versions; newer GCC versions use gcov for line-by-line information. The Binutils manual describes gprofng as a more modern profiler that reads gmon files and offers more functionality. GNU gprof is available at no cost under the listed free plan.

Good

  • Free and open source
  • Produces flat profiles and call graphs
  • Can annotate source output
  • Combines statistics from multiple profile files

Watch out

  • Requires profiling-enabled builds
  • Timing excludes periods when programs are not running
  • Profiling overhead can create artificial hot spots
  • Line profiling requires older GCC versions

Who it suits

GNU gprof suits C and C++ developers who want profiling reports for Linux or self-hosted programs. It is a fit when builds can be compiled and linked with profiling enabled.

Verdict

GNU gprof provides several report formats and can combine data from multiple runs. Its timing boundaries, instrumentation overhead, and older-GCC requirement for line profiling are important constraints to consider.

Plans and prices

From GNU gprof's own pricing page, checked 4 Oct 2026.

All about pricing
PlanPriceWhat it gives you
GNU gprofFreeGNU Binutils command-line profiler

The facts

Each one read from GNU gprof's own pages, with the date it was checked.

What it does

Alternative in suite
The manual describes gprofng as a more modern profiler in Binutils that can read gmon files and provides more functionality.checked 4 Oct 2026
Build requirement
Programs must be compiled and linked with profiling enabled, typically using the compiler option -pg.checked 4 Oct 2026
Combine profiles
gprof can sum statistics from multiple profile data files.checked 4 Oct 2026
Data collection
The profiled program writes its data to gmon.out when it exits normally.checked 4 Oct 2026
Download
GNU Binutils releases are available from ftp.gnu.org and sourceware.org.checked 4 Oct 2026
Instrumentation overhead
Profiling adds overhead to function calls, which the manual says can create artificial hot spots.checked 4 Oct 2026
License
The gprof manual is distributed under the GNU Free Documentation License version 1.3.checked 4 Oct 2026
Line profiling
The -l line profiling feature works only with programs compiled by older GCC versions; newer GCC versions use gcov for line-by-line information.checked 4 Oct 2026
Outputs
It can print a flat profile and call graph, and provide annotated source output.checked 4 Oct 2026
Purpose
GNU gprof analyzes profiling data to show which parts of a program take the most execution time.checked 4 Oct 2026
Sampling limits
Its time measurements do not account for time when a program is not running, such as time limited by I/O or swapping.checked 4 Oct 2026
Support channels
The project lists Bugzilla for bug reports and mailing lists for bug reporting and discussion.checked 4 Oct 2026

Where it runs

Platforms
The Binutils project says its tools have been ported to most major Unix variants and Wintel systems.checked 4 Oct 2026

Alternatives to GNU gprof

All alternatives
  1. 1
    8.4From $0.03 a month
  2. 2

    Grafana Alerting

    Free planWebLinuxmacOSWindows
    6.8$0.03 usage-based
  3. 3

    YourKit .NET Profiler

    Free planAPILinuxmacOSWindows
    6.8From $99 a year
  4. 4Amazon CodeGuru Profiler logo

    Amazon CodeGuru Profiler

    Free planWebAPILinuxSelf-hosted
    6.7From $0.01 a month
  5. 5

    Pyroscope

    Free planWebLinuxmacOSWindows
    6.7From $19 a month
  6. 6Parca logo

    Parca

    Free planWebAPILinuxSelf-hosted
    6.6Free plan