hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/perf/Documentation/tips.txt
....@@ -15,6 +15,7 @@
1515 Show individual samples with: perf script
1616 Limit to show entries above 5% only: perf report --percent-limit 5
1717 Profiling branch (mis)predictions with: perf record -b / perf report
18
+To show assembler sample contexts use perf record -b / perf script -F +brstackinsn --xed
1819 Treat branches as callchains: perf report --branch-history
1920 To count events in every 1000 msec: perf stat -I 1000
2021 Print event counts in CSV format with: perf stat -x,
....@@ -34,3 +35,9 @@
3435 Show user configuration overrides: perf config --user --list
3536 To add Node.js USDT(User-Level Statically Defined Tracing): perf buildid-cache --add `which node`
3637 To report cacheline events from previous recording: perf c2c report
38
+To browse sample contexts use perf report --sample 10 and select in context menu
39
+To separate samples by time use perf report --sort time,overhead,sym
40
+To set sample time separation other than 100ms with --sort time use --time-quantum
41
+Add -I to perf record to sample register values, which will be visible in perf report sample context.
42
+To show IPC for sampling periods use perf record -e '{cycles,instructions}:S' and then browse context
43
+To show context switches in perf report sample context add --switch-events to perf record.