Profiling with Intel¶
Profiling an application means augmenting the compiled binary with information on execution counts per source-line (and basic blocks) -- e.g. one may see how many times an if-statement has been evaluated to true. To do so, compile your code with the profile flag:
Using the gprof tool, one may manually inspect execution count of each executed line of source code.
For compiler optimization, recompile your source using
then execute the most co]]mmon and typical use-case of your application, and then recompile using the generated profile count (and using optimization):