Back to home page

OSCL-LXR

 
 

    


0001 For a higher level overview, try: perf report --sort comm,dso
0002 Sample related events with: perf record -e '{cycles,instructions}:S'
0003 Compare performance results with: perf diff [<old file> <new file>]
0004 Boolean options have negative forms, e.g.: perf report --no-children
0005 Customize output of perf script with: perf script -F event,ip,sym
0006 Generate a script for your data: perf script -g <lang>
0007 Save output of perf stat using: perf stat record <target workload>
0008 Create an archive with symtabs to analyse on other machine: perf archive
0009 Search options using a keyword: perf report -h <keyword>
0010 Use parent filter to see specific call path: perf report -p <regex>
0011 List events using substring match: perf list <keyword>
0012 To see list of saved events and attributes: perf evlist -v
0013 Use --symfs <dir> if your symbol files are in non-standard locations
0014 To see callchains in a more compact form: perf report -g folded
0015 Show individual samples with: perf script
0016 Limit to show entries above 5% only: perf report --percent-limit 5
0017 Profiling branch (mis)predictions with: perf record -b / perf report
0018 To show assembler sample contexts use perf record -b / perf script -F +brstackinsn --xed
0019 Treat branches as callchains: perf report --branch-history
0020 To count events in every 1000 msec: perf stat -I 1000
0021 Print event counts in CSV format with: perf stat -x,
0022 If you have debuginfo enabled, try: perf report -s sym,srcline
0023 For memory address profiling, try: perf mem record / perf mem report
0024 For tracepoint events, try: perf report -s trace_fields
0025 To record callchains for each sample: perf record -g
0026 To record every process run by a user: perf record -u <user>
0027 Skip collecting build-id when recording: perf record -B
0028 To change sampling frequency to 100 Hz: perf record -F 100
0029 See assembly instructions with percentage: perf annotate <symbol>
0030 If you prefer Intel style assembly, try: perf annotate -M intel
0031 For hierarchical output, try: perf report --hierarchy
0032 Order by the overhead of source file name and line number: perf report -s srcline
0033 System-wide collection from all CPUs: perf record -a
0034 Show current config key-value pairs: perf config --list
0035 Show user configuration overrides: perf config --user --list
0036 To add Node.js USDT(User-Level Statically Defined Tracing): perf buildid-cache --add `which node`
0037 To report cacheline events from previous recording: perf c2c report
0038 To browse sample contexts use perf report --sample 10 and select in context menu
0039 To separate samples by time use perf report --sort time,overhead,sym
0040 To set sample time separation other than 100ms with --sort time use --time-quantum
0041 Add -I to perf record to sample register values, which will be visible in perf report sample context.
0042 To show IPC for sampling periods use perf record -e '{cycles,instructions}:S' and then browse context
0043 To show context switches in perf report sample context add --switch-events to perf record.