I\'ve been using the gprof profiler in conjunction with g++.
gprof
g++
I have a function in my code which encapsulates several sections of behaviour whic
Here's a useful resource for you: gprof line by line profiling.
With older versions of the gcc compiler, the gprof -l argument specified line by line profiling.
gprof -l
However, newer versions of gcc use the gcov tool instead of gprof to display line by line profiling information.
gcov