Skip to content

gprof

There are multiple profilers available on UPPMAX. This page describes gprof.

gprof is the GNU profiler, provided with the GNU compiler package.

In order to use gprof do the following:

Load a recent gcc module and a recent binutils module:

module load gcc
module load binutils

Compile your program with the -pg -g flags added

gcc -O0 -pg -g your-program.c -o your-program

run it:

./your-program

then do:

gprof your-program gmon.out > output-file