Callgrind: a call-graph generating cache and branch prediction profiler
•
instrumentation [on|off]
requests to set (if parameter on/off is given) or get the current instrumentation
state.
•
status
requests to print out some status information.
6.5. Callgrind specific client requests
Callgrind provides the following specific client requests in
callgrind.h
. See that file for the exact details of their
arguments.
CALLGRIND_DUMP_STATS
Force generation of a profile dump at specified position in code, for the current thread only. Written counters will be
reset to zero.
CALLGRIND_DUMP_STATS_AT(string)
Same as
CALLGRIND_DUMP_STATS
, but allows to specify a string to be able to distinguish profile dumps.
CALLGRIND_ZERO_STATS
Reset the profile counters for the current thread to zero.
CALLGRIND_TOGGLE_COLLECT
Toggle the collection state.
This allows to ignore events with regard to profile counters.
See also options
--collect-atstart
and
--toggle-collect
.
CALLGRIND_START_INSTRUMENTATION
Start full Callgrind instrumentation if not already enabled. When cache simulation is done, this will flush the simulated
cache and lead to an artifical cache warmup phase afterwards with cache misses which would not have happened in
reality. See also option
--instr-atstart
.
CALLGRIND_STOP_INSTRUMENTATION
Stop full Callgrind instrumentation if not already disabled. This flushes Valgrinds translation cache, and does no
additional instrumentation afterwards: it effectivly will run at the same speed as Nulgrind, i.e. at minimal slowdown.
Use this to speed up the Callgrind run for uninteresting code parts. Use
CALLGRIND_START_INSTRUMENTATION
to enable instrumentation again. See also option
--instr-atstart
.
6.6. callgrind_annotate Command-line Options
-h --help
Show summary of options.
--version
Show version of callgrind_annotate.
--show=A,B,C [default:
all]
Only show figures for events A,B,C.
--sort=A,B,C
Sort columns by events A,B,C [event column order].
--threshold=<0--100> [default:
99%]
Percentage of counts (of primary sort event) we are interested in.
103