mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 21:22:09 +02:00

* gprof: Add instructions for named binary Resolves #15500 * gprof: fix whitespace * gprof: add paths to inputs Co-authored-by: Juri Dispan <juri.dispan@posteo.net> * gprof: do not use placeholder for a.out Co-authored-by: Juri Dispan <juri.dispan@posteo.net> --------- Co-authored-by: Florian B. <gn0mish@protonmail.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
610 B
610 B
gprof
Performance analysis tool for many programming languages. It profiles the function executions of a program. More information: https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_mono/gprof.html.
- Compile binary to default
a.out
with gprof information and run it to getgmon.out
:
gcc -pg {{program.c}} && ./a.out
- Run gprof on default
a.out
andgmon.out
to obtain profile output:
gprof
- Run gprof on a named binary:
gprof {{path/to/binary}} {{path/to/gmon.out}}
- Suppress profile field's description:
gprof -b
- Display routines that have zero usage:
gprof -bz