CG_ANNOTATE(1)
π CG_ANNOTATE(1): the cg_annotate bestie era π
okay bestie, you found the CG_ANNOTATE(1) page π
this is the manual for cg_annotate, and weβre gonna make it make sense. No cap.
πΈ NAME πΈ
cg_annotate β post-processing tool for Cachegrind β¨
π¦ SYNOPSIS π¦
cg_annotate [options] cachegrind-out-file [source-files...]
π DESCRIPTION π
cg_annotate takes one or more Cachegrind output files and prints data about the profiled program in an easy-to-read form. Itβs giving βturn the profiler dump into something your eyeballs can actually enjoyβ π.
π OPTIONS π
-h,--helpβ shows the help message. π«Ά--versionβ shows the version number. π--diffβ diffs two Cachegrind output files. π¦--mod-filename <regex>β [default:none] specifies ans/old/new/search-and-replace expression that is applied to all filenames. This is highkey useful when youβre differencing and need to remove minor differences in paths between two different versions of a program that are sitting in different directories. Anisuffix makes the regex case-insensitive, and agsuffix makes it match multiple times. π--mod-funcname <regex>β [default:none] like--mod-filename, but for filenames. Itβs useful for removing minor differences in randomized names of auto-generated functions generated by some compilers. π§--show=A,B,Cβ [default: all, using order in the Cachegrind output file] specifies which events to show (and the column order). The default is to use all present in the Cachegrind output file (and use the order in the file). Best used in conjunction with--sort. π--sort=A,B,Cβ [default: order in the Cachegrind output file] specifies the events upon which the sorting of thefile:functionandfunction:fileentries will be based. β--threshold=Xβ [default:0.1%] sets the significance threshold for thefile:functionandfunction:filessections. A file or function is shown if it accounts for more thanX%of the counts for the primary sort event. If annotating source files, this also affects which files are annotated. π₯--show-percs,--no-show-percs,--show-percs=<no|yes>β [default:yes] when enabled, a percentage is printed next to all event counts. This helps gauge the relative importance of each function and line. π--annotate,--no-annotate,--auto=<no|yes>β [default:yes] enables or disables source file annotation. π--context=Nβ [default:8] the number of lines of context to show before and after each annotated line. Use a large number (e.g.100000) to show all source lines. π
π SEE ALSO π
Go check out valgrind(1), $INSTALL/share/doc/valgrind/html/index.html, or http://www.valgrind.org/docs/manual/index.html. π¦
π AUTHOR π
Nicholas Nethercote. π
okay bye bestie π«Ά this page is from Release 3.27.1, dated 06/23/2026, and itβs the CG_ANNOTATE(1) manual β mwah π
π¦ where this page comes from
- opensuse-leap 16.0: valgrind 3.27.1-160000.1.1 Β· GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: valgrind 3.27.1-160000.1.1 Β· GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: valgrind 3.27.1-160000.1.1 Β· GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: valgrind 3.27.1-160000.1.1 Β· GFDL-1.2-only AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms