I want to use valgrind to analyze my code. The problem is, that I have a huge startup sequence which I'm not interested in.
I found defines in the valgrind/callgrind.h that should help me:
- CALLGRIND_START_INSTRUMENTATION
- CALLGRIND_STOP_INSTRUMENTATION
- CALLGRIND_DUMP_STATS
According to this article I have to execute valgrind with the following options:
valgrind --tool=callgrind --instr-atstart=no ./application
When I do this two files are created:
- callgrind.out.16060
- callgrind.out.16060.1
I then want to use kcachegrind to visualize my results. This works great but the makros for the skipping of my startup-sequence seem to do nothing. What do I have to do to measure the performance only in places where I want to?