C++ profiler
Table of Contents
valgrind
valgrind --tool=callgrind ./(Your binary)
It will generate a file called callgrind.out.x. You can then use kcachegrind tool to read this file.
gprof
http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html
Be sure to add -pg
to compilation before profiling:
cc -o myprog myprog.c utils.c -g -pg
google-perftools
oprofile
http://oprofile.sourceforge.net/news/
oprofile is good because it makes it much easier than gprof to profile multiple programs at once