gprof - http://www.ibm.com/developerworks/library/l-gnuprof.html http://www.thegeekstuff.com/2012/08/gprof-tutorial/