Elliott Hughes | a0664b9 | 2017-04-18 17:46:52 -0700 | [diff] [blame] | 1 | '\" t |
| 2 | .\" Title: cg_annotate |
| 3 | .\" Author: [see the "Author" section] |
| 4 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> |
| 5 | .\" Date: 10/21/2016 |
| 6 | .\" Manual: Release 3.12.0 |
| 7 | .\" Source: Release 3.12.0 |
| 8 | .\" Language: English |
| 9 | .\" |
| 10 | .TH "CG_ANNOTATE" "1" "10/21/2016" "Release 3.12.0" "Release 3.12.0" |
| 11 | .\" ----------------------------------------------------------------- |
| 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" |
| 31 | cg_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 |
| 38 | takes 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 |
| 43 | Show the help message\&. |
| 44 | .RE |
| 45 | .PP |
| 46 | \fB\-\-version \fR |
| 47 | .RS 4 |
| 48 | Show 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 |
| 53 | Specifies which events to show (and the column order)\&. Default is to use all present in the |
| 54 | cachegrind\&.out\&.<pid> |
| 55 | file (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 |
| 61 | Specifies 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 |
| 66 | Sets 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 |
| 68 | Note: thresholds can be set for more than one of the events by appending any events for the |
| 69 | \fB\-\-sort\fR |
| 70 | option 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 |
| 77 | When 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 |
| 82 | Print 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 |
| 87 | Adds a directory to the list in which to search for files\&. Multiple |
| 88 | \fB\-I\fR/\fB\-\-include\fR |
| 89 | options can be given to add multiple directories\&. |
| 90 | .RE |
| 91 | .SH "SEE ALSO" |
| 92 | .PP |
| 93 | valgrind(1), |
| 94 | $INSTALL/share/doc/valgrind/html/index\&.html |
| 95 | or |
| 96 | http://www\&.valgrind\&.org/docs/manual/index\&.html\&. |
| 97 | .SH "AUTHOR" |
| 98 | .PP |
| 99 | Nicholas Nethercote\&. |