Count syscalls perf
Count specific syscall events
perf stat -e syscalls:sys_enter_read ./my_app
more perf
all 17 commands →
Attach to running process
perf record -p 1234 sleep 5
Live CPU flame call graph
perf top -g --call-graph dwarf
System-wide sampled record
perf record -F 99 -a -g -- sleep 30 && perf report --stdio
Flame graph pipeline
perf script | stackcollapse-perf.pl | flamegraph.pl > flame.svg
Detailed counter stats
perf stat -d -d -d -- ./app