Annotate hot functions

Show annotated assembly for hottest function

perf annotate

tool
perf17 commands
tags
perfprofilingannotate

More perf commands

  • perf record -F 99 -ag -- sleep 30 && perf script > out.perf

    Collect data suitable for flamegraph generation

  • perf stat -e syscalls:sys_enter_read ./my_app

    Count specific syscall events

  • perf record -p 1234 sleep 5

    Profile an already-running process for 5 seconds

  • perf top -g --call-graph dwarf

    Live top hot functions with caller chains; dwarf unwind works without frame pointers

  • perf record -F 99 -a -g -- sleep 30 && perf report --stdio

    Sample whole machine at 99Hz for 30s, then print collapsed report; 99Hz dodges lockstep aliasing

all 17 perf commands