cg_annotate − post−processing tool for Cachegrind


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


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


−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:


−−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 lines.

−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 directories.


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


Nicholas Nethercote.

More Linux Commands

rpmbuild(8) - Build RPM Package(s) - Linux manual page......
rpmbuild is used to build both binary and source software packages. A package consists of an archive of files and meta-data used to install and erase the archiv

gnutls_x509_crl_set_crt(3) - API function - Linux man page
gnutls_x509_crl_set_crt.3 - This function will set a revoked certificates serial number to the CRL. RETURNS On success, GNUTLS_E_SUCCESS (0) is returned, otherw

Tcl_FSLink(3) - procedures to interact with any filesystem
There are several reasons for calling the Tcl_FS API functions (e.g. Tcl_FSAccess and Tcl_FSStat) rather than calling system level functions like access and sta

XkbSetIndicatorMap(3) - Downloads the changes to the server
This section discusses the effects of explicitly changing indicators depending upon different settings in the indicator map. See Tables 1 and Table 2 for inform

gluNurbsCallbackDataEXT(3gl) - set a user data pointer......
gluNurbsCallbackDataEXT is used to pass a pointer to the applications data to NURBS tessellator. A copy of this pointer will be passed by the tessellator in the

lircrcd(1) - daemon to handle consistent .lircrc state among
lircrcd reads the given .lircrc config file and synchronises the mode that the LIRC clients using this config file (irexec(1), irxevent(1) , etc.) are in. Using


Tk_FreeConfigOptions(3) - process configuration options.....
These procedures handle most of the details of parsing configuration options such as those for Tk widgets. Given a description of what options are supported, th

gnutls_x509_crt_set_key_purpose_oid(3) - API function.......
gnutls_x509_crt_set_key_purpose_oid.3 - This function will set the key purpose OIDs of the Certificate. These are stored in the Extended Key Usage extension (2.

xdr_bytes(3) - library routines for external data representa
These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using

SDL_VideoInfo(3) - Video Target information - Linux man page
This (read-only) structure is returned by SDL_GetVideoInfo. It contains information on either the best available mode (if called before SDL_SetVideoMode) or the

field_buffer(3form) - field buffer control - Linux man page
The function set_field_buffer sets the numbered buffer of the given field to contain a given string: * Buffer 0 is the displayed value of the field. * Other num

We can't live, work or learn in freedom unless the software we use is free.