blob: ad81d40a1126371ae0ecd0852a0b7d0197a7d891 [file] [log] [blame]
Elliott Hughesa0664b92017-04-18 17:46:52 -07001'\" t
2.\" Title: cg_annotate
3.\" Author: [see the "Author" section]
Elliott Hughesed398002017-06-21 14:41:24 -07004.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5.\" Date: 06/15/2017
6.\" Manual: Release 3.13.0
7.\" Source: Release 3.13.0
Elliott Hughesa0664b92017-04-18 17:46:52 -07008.\" Language: English
9.\"
Elliott Hughesed398002017-06-21 14:41:24 -070010.TH "CG_ANNOTATE" "1" "06/15/2017" "Release 3.13.0" "Release 3.13.0"
Elliott Hughesa0664b92017-04-18 17:46:52 -070011.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31cg_annotate \- post\-processing tool for Cachegrind
32.SH "SYNOPSIS"
33.HP \w'\fBcg_annotate\fR\ 'u
34\fBcg_annotate\fR [\fIoptions\fR] \fIcachegrind\-out\-file\fR [\fIsource\-files\fR...]
35.SH "DESCRIPTION"
36.PP
37\fBcg_annotate\fR
38takes an output file produced by the Valgrind tool Cachegrind and prints the information in an easy\-to\-read form\&.
39.SH "OPTIONS"
40.PP
41\fB\-h \-\-help \fR
42.RS 4
43Show the help message\&.
44.RE
45.PP
46\fB\-\-version \fR
47.RS 4
48Show the version number\&.
49.RE
50.PP
51\fB\-\-show=A,B,C [default: all, using order in cachegrind\&.out\&.<pid>] \fR
52.RS 4
53Specifies which events to show (and the column order)\&. Default is to use all present in the
54cachegrind\&.out\&.<pid>
55file (and use the order in the file)\&. Useful if you want to concentrate on, for example, I cache misses (\fB\-\-show=I1mr,ILmr\fR), or data read misses (\fB\-\-show=D1mr,DLmr\fR), or LL data misses (\fB\-\-show=DLmr,DLmw\fR)\&. Best used in conjunction with
56\fB\-\-sort\fR\&.
57.RE
58.PP
59\fB\-\-sort=A,B,C [default: order in cachegrind\&.out\&.<pid>] \fR
60.RS 4
61Specifies the events upon which the sorting of the function\-by\-function entries will be based\&.
62.RE
63.PP
64\fB\-\-threshold=X [default: 0\&.1%] \fR
65.RS 4
66Sets the threshold for the function\-by\-function summary\&. A function is shown if it accounts for more than X% of the counts for the primary sort event\&. If auto\-annotating, also affects which files are annotated\&.
67.sp
68Note: thresholds can be set for more than one of the events by appending any events for the
69\fB\-\-sort\fR
70option with a colon and a number (no spaces, though)\&. E\&.g\&. if you want to see each function that covers more than 1% of LL read misses or 1% of LL write misses, use this option:
71.sp
72\fB\-\-sort=DLmr:1,DLmw:1\fR
73.RE
74.PP
75\fB\-\-auto=<no|yes> [default: no] \fR
76.RS 4
77When enabled, automatically annotates every file that is mentioned in the function\-by\-function summary that can be found\&. Also gives a list of those that couldn\*(Aqt be found\&.
78.RE
79.PP
80\fB\-\-context=N [default: 8] \fR
81.RS 4
82Print N lines of context before and after each annotated line\&. Avoids printing large sections of source files that were not executed\&. Use a large number (e\&.g\&. 100000) to show all source lines\&.
83.RE
84.PP
85\fB\-I<dir> \-\-include=<dir> [default: none] \fR
86.RS 4
87Adds a directory to the list in which to search for files\&. Multiple
88\fB\-I\fR/\fB\-\-include\fR
89options can be given to add multiple directories\&.
90.RE
91.SH "SEE ALSO"
92.PP
93valgrind(1),
94$INSTALL/share/doc/valgrind/html/index\&.html
95or
96http://www\&.valgrind\&.org/docs/manual/index\&.html\&.
97.SH "AUTHOR"
98.PP
99Nicholas Nethercote\&.