1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-24 01:22:10 +02:00
tldr/pages/linux/perf.md
2021-10-26 08:19:43 -03:00

24 lines
558 B
Markdown

# perf
> Framework for Linux performance counter measurements.
> More information: <https://perf.wiki.kernel.org>.
- Display basic performance counter stats for a command:
`perf stat {{gcc hello.c}}`
- Display system-wide real-time performance counter profile:
`sudo perf top`
- Run a command and record its profile into `perf.data`:
`sudo perf record {{command}}`
- Record the profile of an existing process into `perf.data`:
`sudo perf record -p {{pid}}`
- Read `perf.data` (created by `perf record`) and display the profile:
`sudo perf report`