6 perf-record - Run a command and record its profile into perf.data
11 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command>
12 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>]
16 This command runs a command and gathers a performance counter profile
17 from it, into perf.data - without displaying anything.
19 This file can then be inspected later on, using 'perf report'.
25 Any command you can specify in a shell.
29 Select the PMU event. Selection can be:
31 - a symbolic event name (use 'perf list' to list all events)
33 - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a
34 hexadecimal event descriptor.
36 - a hardware breakpoint event in the form of '\mem:addr[:access]'
37 where addr is the address in memory you want to break in.
38 Access is the memory access type (read, write, execute) it can
39 be passed as follows: '\mem:addr[:[r][w][x]]'.
40 If you want to profile read-write accesses in 0x1000, just set
48 System-wide collection from all CPUs.
55 Record events on existing process ID.
59 Record events on existing thread ID.
63 Collect data with this RT SCHED_FIFO priority.
66 Append to the output file to do incremental profiling.
70 Overwrite existing data file. (deprecated)
74 Event period to sample.
82 Child tasks do not inherit counters.
85 Profile at this frequency.
89 Number of mmap data pages.
93 Do call-graph (stack chain/backtrace) recording.
97 Don't print any message, useful for scripting.
101 Be more verbose (show counter open errors, etc).
113 Sample timestamps. Use it with 'perf report -D' to see the timestamps,
122 Collect raw sample records from all opened counters (default for tracepoint counters).
126 Collect samples only on the list of CPUs provided. Multiple CPUs can be provided as a
127 comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
128 In per-thread mode with inheritance mode on (default), samples are captured only when
129 the thread executes on the designated CPUs. Default is to monitor all CPUs.
133 Do not update the builid cache. This saves some overhead in situations
134 where the information in the perf.data file (which includes buildids)
139 linkperf:perf-stat[1], linkperf:perf-list[1]