]>
Commit | Line | Data |
---|---|---|
e33e0a43 | 1 | perf-record(1) |
c1c2365a | 2 | ============== |
e33e0a43 IM |
3 | |
4 | NAME | |
5 | ---- | |
23ac9cbe | 6 | perf-record - Run a command and record its profile into perf.data |
e33e0a43 IM |
7 | |
8 | SYNOPSIS | |
9 | -------- | |
10 | [verse] | |
11 | 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command> | |
9e096753 | 12 | 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>] |
e33e0a43 IM |
13 | |
14 | DESCRIPTION | |
15 | ----------- | |
16 | This command runs a command and gathers a performance counter profile | |
23ac9cbe | 17 | from it, into perf.data - without displaying anything. |
e33e0a43 IM |
18 | |
19 | This file can then be inspected later on, using 'perf report'. | |
20 | ||
21 | ||
22 | OPTIONS | |
23 | ------- | |
24 | <command>...:: | |
25 | Any command you can specify in a shell. | |
26 | ||
27 | -e:: | |
28 | --event=:: | |
1b290d67 | 29 | Select the PMU event. Selection can be: |
e33e0a43 | 30 | |
1b290d67 FW |
31 | - a symbolic event name (use 'perf list' to list all events) |
32 | ||
33 | - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a | |
34 | hexadecimal event descriptor. | |
35 | ||
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 | |
41 | 'mem:0x1000:rw'. | |
e33e0a43 | 42 | -a:: |
386c0b70 | 43 | System-wide collection. |
e33e0a43 IM |
44 | |
45 | -l:: | |
386c0b70 ACM |
46 | Scale counter values. |
47 | ||
48 | -p:: | |
49 | --pid=:: | |
50 | Record events on existing pid. | |
51 | ||
52 | -r:: | |
53 | --realtime=:: | |
54 | Collect data with this RT SCHED_FIFO priority. | |
55 | -A:: | |
56 | --append:: | |
57 | Append to the output file to do incremental profiling. | |
58 | ||
59 | -f:: | |
60 | --force:: | |
7865e817 | 61 | Overwrite existing data file. (deprecated) |
386c0b70 ACM |
62 | |
63 | -c:: | |
64 | --count=:: | |
65 | Event period to sample. | |
66 | ||
67 | -o:: | |
68 | --output=:: | |
69 | Output file name. | |
70 | ||
71 | -i:: | |
2e6cdf99 SE |
72 | --no-inherit:: |
73 | Child tasks do not inherit counters. | |
386c0b70 ACM |
74 | -F:: |
75 | --freq=:: | |
76 | Profile at this frequency. | |
77 | ||
78 | -m:: | |
79 | --mmap-pages=:: | |
80 | Number of mmap data pages. | |
81 | ||
82 | -g:: | |
83 | --call-graph:: | |
84 | Do call-graph (stack chain/backtrace) recording. | |
85 | ||
b44308f5 ACM |
86 | -q:: |
87 | --quiet:: | |
88 | Don't print any message, useful for scripting. | |
89 | ||
386c0b70 ACM |
90 | -v:: |
91 | --verbose:: | |
92 | Be more verbose (show counter open errors, etc). | |
93 | ||
94 | -s:: | |
95 | --stat:: | |
96 | Per thread counts. | |
97 | ||
98 | -d:: | |
99 | --data:: | |
100 | Sample addresses. | |
101 | ||
102 | -n:: | |
103 | --no-samples:: | |
104 | Don't sample. | |
e33e0a43 | 105 | |
ec7ba4ea FW |
106 | -R:: |
107 | --raw-samples:: | |
bdef3b02 | 108 | Collect raw sample records from all opened counters (default for tracepoint counters). |
ec7ba4ea | 109 | |
c45c6ea2 SE |
110 | -C:: |
111 | --cpu:: | |
112 | Collect samples only on the list of cpus provided. Multiple CPUs can be provided as a | |
113 | comma-sperated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2. | |
114 | In per-thread mode with inheritance mode on (default), samples are captured only when | |
115 | the thread executes on the designated CPUs. Default is to monitor all CPUs. | |
116 | ||
a1ac1d3c SE |
117 | -N:: |
118 | --no-buildid-cache:: | |
119 | Do not update the builid cache. This saves some overhead in situations | |
120 | where the information in the perf.data file (which includes buildids) | |
121 | is sufficient. | |
122 | ||
e33e0a43 IM |
123 | SEE ALSO |
124 | -------- | |
386b05e3 | 125 | linkperf:perf-stat[1], linkperf:perf-list[1] |