1CG_ANNOTATE(1) cg_annotate CG_ANNOTATE(1)
2
3
4
6 cg_annotate - post-processing tool for Cachegrind
7
9 cg_annotate [options] cachegrind-out-file [source-files...]
10
12 cg_annotate takes one or more Cachegrind output files and prints data
13 about the profiled program in an easy-to-read form.
14
16 -h --help
17 Show the help message.
18
19 --version
20 Show the version number.
21
22 --diff
23 Diff two Cachegrind output files.
24
25 --mod-filename <regex> [default: none]
26 Specifies an s/old/new/ search-and-replace expression that is
27 applied to all filenames. Useful when differencing, for removing
28 minor differences in paths between two different versions of a
29 program that are sitting in different directories. An i suffix
30 makes the regex case-insensitive, and a g suffix makes it match
31 multiple times.
32
33 --mod-funcname <regex> [default: none]
34 Like --mod-filename, but for filenames. Useful for removing minor
35 differences in randomized names of auto-generated functions
36 generated by some compilers.
37
38 --show=A,B,C [default: all, using order in the Cachegrind output file]
39 Specifies which events to show (and the column order). Default is
40 to use all present in the Cachegrind output file (and use the order
41 in the file). Best used in conjunction with --sort.
42
43 --sort=A,B,C [default: order in the Cachegrind output file]
44 Specifies the events upon which the sorting of the file:function
45 and function:file entries will be based.
46
47 --threshold=X [default: 0.1%]
48 Sets the significance threshold for the file:function and
49 function:files sections. A file or function is shown if it accounts
50 for more than X% of the counts for the primary sort event. If
51 annotating source files, this also affects which files are
52 annotated.
53
54 --show-percs, --no-show-percs, --show-percs=<no|yes> [default: yes]
55 When enabled, a percentage is printed next to all event counts.
56 This helps gauge the relative importance of each function and line.
57
58 --annotate, --no-annotate, --auto=<no|yes> [default: yes]
59 Enables or disables source file annotation.
60
61 --context=N [default: 8]
62 The number of lines of context to show before and after each
63 annotated line. Use a large number (e.g. 100000) to show all source
64 lines.
65
67 valgrind(1), $INSTALL/share/doc/valgrind/html/index.html or
68 http://www.valgrind.org/docs/manual/index.html.
69
71 Nicholas Nethercote.
72
73
74
75Release 3.22.0 10/31/2023 CG_ANNOTATE(1)