mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 00:22:09 +02:00
gprof: add instructions for named binary (#15505)
* 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>
This commit is contained in:
parent
e9c281ada0
commit
c11d66458a
1 changed files with 7 additions and 3 deletions
|
@ -4,14 +4,18 @@
|
|||
> 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`:
|
||||
- Compile binary to default `a.out` with gprof information and run it to get `gmon.out`:
|
||||
|
||||
`gcc -pg {{program.c}} && {{./a.out}}`
|
||||
`gcc -pg {{program.c}} && ./a.out`
|
||||
|
||||
- Run gprof to obtain profile output:
|
||||
- Run gprof on default `a.out` and `gmon.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`
|
||||
|
|
Loading…
Add table
Reference in a new issue