CALLGRIND_ANNOTATE(1)

πŸ’– NAME πŸ’–

Okay bestie, welcome to the CALLGRIND ANNOTATE(1) manual page ✨ We're talking about callgrind_annotate β€” the post-processing tool for the Callgrind, periodt πŸ’…


✨ SYNOPSIS ✨

callgrind_annotate [options] [callgrind-out-file [source-files...]]

πŸ¦‹ DESCRIPTION πŸ¦‹

So callgrind_annotate takes an output file produced by the Valgrind tool Callgrind and prints the information in an easy-to-read form. No cap, that's her whole main character energy 🌈


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows a summary of options. Ur welcome 🫢
  • --version β€” shows the version of callgrind_annotate ⭐
  • --show=A,B,C [default: all] β€” only show figures for events A,B,C. Keep it selective, bestie πŸ’…
  • --threshold=<0--100> [default: 99%] β€” this is the percentage of counts (of the primary sort event) we are interested in πŸ‘‘

Here's the vibe: callgrind_annotate stops printing functions when the sum of the cost percentage of the printed functions is bigger or equal to the given threshold percentage. Literally the cutoff point, iykyk ✨

  • --sort=A,B,C β€” sorts columns by events A,B,C in event column order πŸ’–

Optionally, each event is followed by a : and a threshold, so you can specify different thresholds depending on the event. Fancy, right? πŸŽ€

callgrind_annotate stops printing functions when the sum of the cost percentage of the printed functions for all the events is bigger or equal to the given event threshold percentages. When one or more thresholds are given via this option, the value of --threshold is ignored πŸ‘€

  • --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 line πŸ“Šβœ¨
  • --auto=<yes|no> [default: yes] β€” annotate all source files containing functions that helped reach the event count threshold. Very helpful, ngl πŸ¦‹
  • --context=N [default: 8] β€” prints N lines of context before and after annotated lines. Snackable context, fr fr πŸ“
  • --inclusive=<yes|no> [default: no] β€” adds subroutine costs to functions calls. Inclusive queen behavior πŸ‘‘
  • --tree=<none|caller|calling|both> [default: none] β€” prints for each function their callers, the called functions or both. Choose ur fighter 🌸
  • -I, --include=<dir> β€” adds dir to the list of directories to search for source files. Very demure, very directory-search πŸ’…

🌈 SEE ALSO 🌈

Go peek at valgrind(1), $INSTALL/share/doc/valgrind/html/index.html, or http://www.valgrind.org/docs/manual/index.html πŸ‘€βœ¨


πŸ’œ AUTHOR πŸ’œ

Josef Weidendorfer <Josef.Weidendorfer@gmx.de>.

This manual page was written by Philipp Frauenfelder <pfrauenf@debian.org> 🫢


Okay that's the whole page, bestie β€” this was Release 3.27.1, dated 06/23/2026, from the CALLGRIND ANNOTATE(1) manual. byeee 🫢✨

πŸ“¦ where this page comes from