blob: 66177511c5c4b381b4a8fe144884afe2080e0e71 [file] [log] [blame]
Stephane Eranian028f12e2013-01-24 16:10:38 +01001perf-mem(1)
2===========
3
4NAME
5----
6perf-mem - Profile memory accesses
7
8SYNOPSIS
9--------
10[verse]
11'perf mem' [<options>] (record [<command>] | report)
12
13DESCRIPTION
14-----------
Stephane Eranian67121f82014-12-17 16:23:55 +010015"perf mem record" runs a command and gathers memory operation data
Stephane Eranian028f12e2013-01-24 16:10:38 +010016from it, into perf.data. Perf record options are accepted and are passed through.
17
Stephane Eranian67121f82014-12-17 16:23:55 +010018"perf mem report" displays the result. It invokes perf report with the
19right set of options to display a memory access profile. By default, loads
20and stores are sampled. Use the -t option to limit to loads or stores.
Stephane Eranian028f12e2013-01-24 16:10:38 +010021
Andi Kleenb6394092014-02-28 06:02:14 -080022Note that on Intel systems the memory latency reported is the use-latency,
23not the pure load (or store latency). Use latency includes any pipeline
24queueing delays in addition to the memory subsystem latency.
25
Stephane Eranian028f12e2013-01-24 16:10:38 +010026OPTIONS
27-------
28<command>...::
29 Any command you can specify in a shell.
30
Sangwon Hong3138a2e2018-04-22 16:29:06 +090031-i::
32--input=<file>::
33 Input file name.
34
Sangwon Hong7e99b192018-02-12 05:38:37 +090035-f::
36--force::
37 Don't do ownership validation
38
Stephane Eranian028f12e2013-01-24 16:10:38 +010039-t::
Sangwon Hong3138a2e2018-04-22 16:29:06 +090040--type=<type>::
Stephane Eranian67121f82014-12-17 16:23:55 +010041 Select the memory operation type: load or store (default: load,store)
Stephane Eranian028f12e2013-01-24 16:10:38 +010042
43-D::
Sangwon Hong3138a2e2018-04-22 16:29:06 +090044--dump-raw-samples::
Stephane Eranian028f12e2013-01-24 16:10:38 +010045 Dump the raw decoded samples on the screen in a format that is easy to parse with
46 one sample per line.
47
48-x::
Sangwon Hong3138a2e2018-04-22 16:29:06 +090049--field-separator=<separator>::
Stephane Eranian028f12e2013-01-24 16:10:38 +010050 Specify the field separator used when dump raw samples (-D option). By default,
51 The separator is the space character.
52
53-C::
Sangwon Hong3138a2e2018-04-22 16:29:06 +090054--cpu=<cpu>::
55 Monitor only on the list of CPUs provided. Multiple CPUs can be provided as a
56 comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2. Default
57 is to monitor all CPUS.
58-U::
59--hide-unresolved::
60 Only display entries resolved to a symbol.
61
62-p::
63--phys-data::
64 Record/Report sample physical addresses
65
Kan Liang06280e32021-01-05 11:57:48 -080066--data-page-size::
67 Record/Report sample data address page size
68
Sangwon Hong3138a2e2018-04-22 16:29:06 +090069RECORD OPTIONS
70--------------
71-e::
72--event <event>::
73 Event selector. Use 'perf mem record -e list' to list available events.
Stephane Eranian028f12e2013-01-24 16:10:38 +010074
Jiri Olsaad165112016-03-24 13:52:16 +010075-K::
76--all-kernel::
77 Configure all used events to run in kernel space.
78
79-U::
80--all-user::
81 Configure all used events to run in user space.
82
Sangwon Hong3138a2e2018-04-22 16:29:06 +090083-v::
84--verbose::
85 Be more verbose (show counter open errors, etc)
Jiri Olsab0d745b2016-06-14 20:19:11 +020086
Sangwon Hong3138a2e2018-04-22 16:29:06 +090087--ldlat <n>::
Ravi Bangoriaf0fabf92019-01-29 18:54:12 +053088 Specify desired latency for loads event. (x86 only)
Kan Liangc35aeb92017-08-29 13:11:10 -040089
Andi Kleena7e9eab2018-04-06 13:38:09 -070090In addition, for report all perf report options are valid, and for record
91all perf record options.
92
Stephane Eranian028f12e2013-01-24 16:10:38 +010093SEE ALSO
94--------
95linkperf:perf-record[1], linkperf:perf-report[1]