snippetbashTip
perf — Framework for Linux performance counter measurements. More information: <https://perfwiki.github.io/
Viewed 0 times
countercommandframeworkperfclilinuxperformancefor
linux
Problem
How to use the
perf command: Framework for Linux performance counter measurements. More information: <https://perfwiki.github.io/main/>.Solution
perf — Framework for Linux performance counter measurements. More information: <https://perfwiki.github.io/main/>.Display basic performance counter stats for a command:
perf stat {{gcc hello.c}}Display system-wide real-time performance counter profile:
sudo perf topRun 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]}} {{pid}}Read
perf.data (created by perf record) and display the profile:sudo perf reportCode Snippets
Display basic performance counter stats for a command
perf stat {{gcc hello.c}}Display system-wide real-time performance counter profile
sudo perf topRun 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]}} {{pid}}Read `perf.data` (created by `perf record`) and display the profile
sudo perf reportContext
tldr-pages: linux/perf
Revisions (0)
No revisions yet.