C++ – How to Profile Applications on Linux

c++linuxprofiler

I would like to profile my c++ application on linux.
I would like to find out how much time my application spent on CPU processing vs time spent on block by IO/being idle.

I know there is a profile tool call valgrind on linux. But it breaks down time spent on each method, and it does not give me an overall picture of how much time spent on CPU processing vs idle? Or is there a way to do that with valgrind.

Best Answer

Check out oprofile. Also for more system-level diagnostics, try systemtap.

Related Question