114cbfbebSNamhyung KimFor a higher level overview, try: perf report --sort comm,dso 214cbfbebSNamhyung KimSample related events with: perf record -e '{cycles,instructions}:S' 314cbfbebSNamhyung KimCompare performance results with: perf diff [<old file> <new file>] 414cbfbebSNamhyung KimBoolean options have negative forms, e.g.: perf report --no-children 514cbfbebSNamhyung KimCustomize output of perf script with: perf script -F event,ip,sym 614cbfbebSNamhyung KimGenerate a script for your data: perf script -g <lang> 714cbfbebSNamhyung KimSave output of perf stat using: perf stat record <target workload> 814cbfbebSNamhyung KimCreate an archive with symtabs to analyse on other machine: perf archive 914cbfbebSNamhyung KimSearch options using a keyword: perf report -h <keyword> 1014cbfbebSNamhyung KimUse parent filter to see specific call path: perf report -p <regex> 1114cbfbebSNamhyung KimList events using substring match: perf list <keyword> 1214cbfbebSNamhyung KimTo see list of saved events and attributes: perf evlist -v 1314cbfbebSNamhyung KimUse --symfs <dir> if your symbol files are in non-standard locations 1414cbfbebSNamhyung KimTo see callchains in a more compact form: perf report -g folded 1509f19854SNamhyung KimShow individual samples with: perf script 1609f19854SNamhyung KimLimit to show entries above 5% only: perf report --percent-limit 5 1709f19854SNamhyung KimProfiling branch (mis)predictions with: perf record -b / perf report 18ca52babeSAndi KleenTo show assembler sample contexts use perf record -b / perf script -F +brstackinsn --xed 1909f19854SNamhyung KimTreat branches as callchains: perf report --branch-history 2009f19854SNamhyung KimTo count events in every 1000 msec: perf stat -I 1000 2109f19854SNamhyung KimPrint event counts in CSV format with: perf stat -x, 2209f19854SNamhyung KimIf you have debuginfo enabled, try: perf report -s sym,srcline 2309f19854SNamhyung KimFor memory address profiling, try: perf mem record / perf mem report 2409f19854SNamhyung KimFor tracepoint events, try: perf report -s trace_fields 2509f19854SNamhyung KimTo record callchains for each sample: perf record -g 269332ef9dSMasahiro YamadaTo record every process run by a user: perf record -u <user> 271291927aSKim PhillipsSkip collecting build-id when recording: perf record -B 2809f19854SNamhyung KimTo change sampling frequency to 100 Hz: perf record -F 100 2909f19854SNamhyung KimSee assembly instructions with percentage: perf annotate <symbol> 3009f19854SNamhyung KimIf you prefer Intel style assembly, try: perf annotate -M intel 314251446dSNamhyung KimFor hierarchical output, try: perf report --hierarchy 328649b643SKim SeonYoungOrder by the overhead of source file name and line number: perf report -s srcline 3349343235SDonghyun KimSystem-wide collection from all CPUs: perf record -a 342ad8327fSNambong HaShow current config key-value pairs: perf config --list 352ad8327fSNambong HaShow user configuration overrides: perf config --user --list 362e38e661SHansuk HongTo add Node.js USDT(User-Level Statically Defined Tracing): perf buildid-cache --add `which node` 3701251952SSangwon HongTo report cacheline events from previous recording: perf c2c report 38ca52babeSAndi KleenTo browse sample contexts use perf report --sample 10 and select in context menu 39ca52babeSAndi KleenTo separate samples by time use perf report --sort time,overhead,sym 40ca52babeSAndi KleenTo set sample time separation other than 100ms with --sort time use --time-quantum 41*734ac47eSAndi KleenAdd -I to perf record to sample register values, which will be visible in perf report sample context. 42ca52babeSAndi KleenTo show IPC for sampling periods use perf record -e '{cycles,instructions}:S' and then browse context 43ca52babeSAndi KleenTo show context switches in perf report sample context add --switch-events to perf record. 44