mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-09-19 01:43:18 +08:00
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
668 B
668 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/html_mono/gprof.html.
- Compile binary to default
a.outwith gprof information and run it to getgmon.out:
gcc {{[-p|-pg]}} {{program.c}} && ./a.out
- Run gprof on default
a.outandgmon.outto 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|--brief]}}
- Display routines that have zero usage:
gprof {{[-bz|--brief --display-unused-functions]}}