I\'m trying to profile (with Callgrind) a specific part of my code by removing noise and computation that I don\'t care about. Here is an example of what I want to do:
I finally managed to solve this issue... This was a config issue:
I kept the code
for (int i=0; i
But ran the callgrind with --collect-atstart=no (and without the --instr-atstart=no!!!) and it worked perfectly, in a reasonable time (~1min).
The issue with START/STOP instrumentation was that callgrind dumps a file (callgrind.out.#number) at each iteration (each STOP) thus it was really really slow... (after 5min I had only 5000 runs for a 300 000 iterations benchmark... unsuitable for a regression test).