mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-07 06:57:05 +00:00
Update cheatsheets
This commit is contained in:
26
gprof
Normal file
26
gprof
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
Reference in New Issue
Block a user