valgrind and gprof – performance messure tools

to create a graph of all call from your executable, use valgrind:

valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --collect-jumps=yes program arguments

then open in kcachegrind (also available for Windows)


gprof: you need to compile with -pg. then a gmon.out file will be created.

open that file with:

gprof program gmon.out > gprof.txt
gprof program gmon.out | less

Comments are closed.