Skip to content
cheatsheet
home
/
cv
/
weblog
/
cheatsheet
/
proxy
/
vpn
/
status
/
links
EN
RU
☾
New version available
reload
×
cheatsheet
/
perf
/
Record with specific event
Record with specific event
perf
Record only cache-miss events
perf record -e cache-misses ./my_app
⎘ copy
#perf
#profiling
#cache
more perf
all 17 commands →
Top-like live view
perf top
Annotate hot functions
perf annotate
Flamegraph data collection
perf record -F 99 -ag -- sleep 30 && perf script > out.perf
Count syscalls
perf stat -e syscalls:sys_enter_read ./my_app
Attach to running process
perf record -p 1234 sleep 5