Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 1 | perf-mem(1) |
| 2 | =========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | perf-mem - Profile memory accesses |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | 'perf mem' [<options>] (record [<command>] | report) |
| 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Stephane Eranian | 67121f8 | 2014-12-17 16:23:55 +0100 | [diff] [blame] | 15 | "perf mem record" runs a command and gathers memory operation data |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 16 | from it, into perf.data. Perf record options are accepted and are passed through. |
| 17 | |
Stephane Eranian | 67121f8 | 2014-12-17 16:23:55 +0100 | [diff] [blame] | 18 | "perf mem report" displays the result. It invokes perf report with the |
| 19 | right set of options to display a memory access profile. By default, loads |
| 20 | and stores are sampled. Use the -t option to limit to loads or stores. |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 21 | |
Andi Kleen | b639409 | 2014-02-28 06:02:14 -0800 | [diff] [blame] | 22 | Note that on Intel systems the memory latency reported is the use-latency, |
| 23 | not the pure load (or store latency). Use latency includes any pipeline |
| 24 | queueing delays in addition to the memory subsystem latency. |
| 25 | |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 26 | OPTIONS |
| 27 | ------- |
| 28 | <command>...:: |
| 29 | Any command you can specify in a shell. |
| 30 | |
Sangwon Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 31 | -i:: |
| 32 | --input=<file>:: |
| 33 | Input file name. |
| 34 | |
Sangwon Hong | 7e99b19 | 2018-02-12 05:38:37 +0900 | [diff] [blame] | 35 | -f:: |
| 36 | --force:: |
| 37 | Don't do ownership validation |
| 38 | |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 39 | -t:: |
Sangwon Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 40 | --type=<type>:: |
Stephane Eranian | 67121f8 | 2014-12-17 16:23:55 +0100 | [diff] [blame] | 41 | Select the memory operation type: load or store (default: load,store) |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 42 | |
| 43 | -D:: |
Sangwon Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 44 | --dump-raw-samples:: |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 45 | 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 Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 49 | --field-separator=<separator>:: |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 50 | Specify the field separator used when dump raw samples (-D option). By default, |
| 51 | The separator is the space character. |
| 52 | |
| 53 | -C:: |
Sangwon Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 54 | --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 Liang | 06280e3 | 2021-01-05 11:57:48 -0800 | [diff] [blame] | 66 | --data-page-size:: |
| 67 | Record/Report sample data address page size |
| 68 | |
Sangwon Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 69 | RECORD OPTIONS |
| 70 | -------------- |
| 71 | -e:: |
| 72 | --event <event>:: |
| 73 | Event selector. Use 'perf mem record -e list' to list available events. |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 74 | |
Jiri Olsa | ad16511 | 2016-03-24 13:52:16 +0100 | [diff] [blame] | 75 | -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 Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 83 | -v:: |
| 84 | --verbose:: |
| 85 | Be more verbose (show counter open errors, etc) |
Jiri Olsa | b0d745b | 2016-06-14 20:19:11 +0200 | [diff] [blame] | 86 | |
Sangwon Hong | 3138a2e | 2018-04-22 16:29:06 +0900 | [diff] [blame] | 87 | --ldlat <n>:: |
Ravi Bangoria | f0fabf9 | 2019-01-29 18:54:12 +0530 | [diff] [blame] | 88 | Specify desired latency for loads event. (x86 only) |
Kan Liang | c35aeb9 | 2017-08-29 13:11:10 -0400 | [diff] [blame] | 89 | |
Andi Kleen | a7e9eab | 2018-04-06 13:38:09 -0700 | [diff] [blame] | 90 | In addition, for report all perf report options are valid, and for record |
| 91 | all perf record options. |
| 92 | |
Stephane Eranian | 028f12e | 2013-01-24 16:10:38 +0100 | [diff] [blame] | 93 | SEE ALSO |
| 94 | -------- |
| 95 | linkperf:perf-record[1], linkperf:perf-report[1] |