gprof: add page (#9485)

pull/1/head
Raph 2022-11-08 13:47:11 -08:00 committed by GitHub
parent 3fc7bd3d7d
commit 95f7704f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

21
pages/common/gprof.md Normal file
View File

@ -0,0 +1,21 @@
# 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 with gprof information and run it to get `gmon.out`:
`gcc -pg {{program.c}} && {{./a.out}}`
- Run gprof to obtain profile output:
`gprof`
- Suppress profile field's description:
`gprof -b`
- Display routines that have zero usage:
`gprof -bz`