CG_ANNOTATE(1)                 Release 3.15.0                 CG_ANNOTATE(1)

NAME         top

       cg_annotate - post-processing tool for Cachegrind

SYNOPSIS         top

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

DESCRIPTION         top

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

OPTIONS         top

       -h --help
           Show the help message.

           Show the version number.

       --show=A,B,C [default: all, using order in cachegrind.out.<pid>]
           Specifies which events to show (and the column order). Default is
           to use all present in the cachegrind.out.<pid> file (and use the
           order in the file). Useful if you want to concentrate on, for
           example, I cache misses (--show=I1mr,ILmr), or data read misses
           (--show=D1mr,DLmr), or LL data misses (--show=DLmr,DLmw). Best
           used in conjunction with --sort.

       --sort=A,B,C [default: order in cachegrind.out.<pid>]
           Specifies the events upon which the sorting of the
           function-by-function entries will be based.

       --threshold=X [default: 0.1%]
           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.

           Note: thresholds can be set for more than one of the events by
           appending any events for the --sort 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:


       --show-percs=<no|yes> [default: no]
           When enabled, a percentage is printed next to all event counts.
           This helps gauge the relative importance of each function and

       --auto=<no|yes> [default: no]
           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't be found.

       --context=N [default: 8]
           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

       -I<dir> --include=<dir> [default: none]
           Adds a directory to the list in which to search for files.
           Multiple -I/--include options can be given to add multiple

SEE ALSO         top

       valgrind(1), $INSTALL/share/doc/valgrind/html/index.html or

AUTHOR         top

       Nicholas Nethercote.

COLOPHON         top

       This page is part of the valgrind (a system for debugging and
       profiling Linux programs) project.  Information about the project can
       be found at ⟨⟩.  If you have a bug report for
       this manual page, see
       ⟨⟩.  This page was
       obtained from the project's upstream Git repository
       ⟨⟩ on 2019-05-09.  (At that
       time, the date of the most recent commit that was found in the repos‐
       itory was 2019-05-08.)  If you discover any rendering problems in
       this HTML version of the page, or you believe there is a better or
       more up-to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not part
       of the original manual page), send a mail to

Release 3.15.0                   05/09/2019                   CG_ANNOTATE(1)

Pages that refer to this page: cg_diff(1)cg_merge(1)valgrind(1)