I am trying to find a profiling tool with which I can find out, how much time is spend on each line of code in a C/C++ program. I am working on Linux platforms (Ubuntu, Gentoo, SL) mainly with gcc. I use gprof but sometimes I need the “per line” information.
Any suggestions? Thank you!
On linux you can use oprofile. This is a sample based profiler which runs on almost any platform and supports the performance monitoring registers if they are available. On x86 it works with both AMD and Intel.
You can use it as standalone program wich will give you an annotated source, but there is a plugin available (linuxtools) for eclipse which integrates nicely into the IDE.