1CG_ANNOTATE(1)                    cg_annotate                   CG_ANNOTATE(1)
2
3
4

NAME

6       cg_annotate - post-processing tool for Cachegrind
7

SYNOPSIS

9       cg_annotate [options] cachegrind-out-file [source-files...]
10

DESCRIPTION

12       cg_annotate takes an output file produced by the Valgrind tool
13       Cachegrind and prints the information in an easy-to-read form.
14

OPTIONS

16       -h --help
17           Show the help message.
18
19       --version
20           Show the version number.
21
22       --show=A,B,C [default: all, using order in cachegrind.out.<pid>]
23           Specifies which events to show (and the column order). Default is
24           to use all present in the cachegrind.out.<pid> file (and use the
25           order in the file). Useful if you want to concentrate on, for
26           example, I cache misses (--show=I1mr,ILmr), or data read misses
27           (--show=D1mr,DLmr), or LL data misses (--show=DLmr,DLmw). Best used
28           in conjunction with --sort.
29
30       --sort=A,B,C [default: order in cachegrind.out.<pid>]
31           Specifies the events upon which the sorting of the
32           function-by-function entries will be based.
33
34       --threshold=X [default: 0.1%]
35           Sets the threshold for the function-by-function summary. A function
36           is shown if it accounts for more than X% of the counts for the
37           primary sort event. If auto-annotating, also affects which files
38           are annotated.
39
40           Note: thresholds can be set for more than one of the events by
41           appending any events for the --sort option with a colon and a
42           number (no spaces, though). E.g. if you want to see each function
43           that covers more than 1% of LL read misses or 1% of LL write
44           misses, use this option:
45
46           --sort=DLmr:1,DLmw:1
47
48       --show-percs=<no|yes> [default: yes]
49           When enabled, a percentage is printed next to all event counts.
50           This helps gauge the relative importance of each function and line.
51
52       --auto=<no|yes> [default: yes]
53           When enabled, automatically annotates every file that is mentioned
54           in the function-by-function summary that can be found. Also gives a
55           list of those that couldn't be found.
56
57       --context=N [default: 8]
58           Print N lines of context before and after each annotated line.
59           Avoids printing large sections of source files that were not
60           executed. Use a large number (e.g. 100000) to show all source
61           lines.
62
63       -I<dir> --include=<dir> [default: none]
64           Adds a directory to the list in which to search for files. Multiple
65           -I/--include options can be given to add multiple directories.
66

SEE ALSO

68       valgrind(1), $INSTALL/share/doc/valgrind/html/index.html or
69       http://www.valgrind.org/docs/manual/index.html.
70

AUTHOR

72       Nicholas Nethercote.
73
74
75
76Release 3.19.0                    04/11/2022                    CG_ANNOTATE(1)
Impressum