Profilers for C/C++
gprof
gprof
is the GNU profiler, suitable for function-level profiling code compiled with C, C++ & Fortran compiled with the GNU compilers. If already compiling your code with GCC/G++, it’s relatively easy to setup and use. As a command-line profiler output is provided in a plaintext format, this can be challenging to interpret for more nuanced and subtle bottlenecks.
Intel VTune
Intel VTune Profiler is a fully-featured profiler that supports a broad range of languages. Users wishing to perform function or line level profiling can use the default “Hotspots” configuration, that will output profiling results in an interactive GUI with several visualisation options to aide interpretation of CPU time within the profiled application.
There are also many more advanced profiling configurations available, covering memory and hardware metrics, these are unlikely to be useful for the typical programmer.
Read More