162306a36Sopenharmony_ciperf-mem(1) 262306a36Sopenharmony_ci=========== 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciNAME 562306a36Sopenharmony_ci---- 662306a36Sopenharmony_ciperf-mem - Profile memory accesses 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciSYNOPSIS 962306a36Sopenharmony_ci-------- 1062306a36Sopenharmony_ci[verse] 1162306a36Sopenharmony_ci'perf mem' [<options>] (record [<command>] | report) 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciDESCRIPTION 1462306a36Sopenharmony_ci----------- 1562306a36Sopenharmony_ci"perf mem record" runs a command and gathers memory operation data 1662306a36Sopenharmony_cifrom it, into perf.data. Perf record options are accepted and are passed through. 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci"perf mem report" displays the result. It invokes perf report with the 1962306a36Sopenharmony_ciright set of options to display a memory access profile. By default, loads 2062306a36Sopenharmony_ciand stores are sampled. Use the -t option to limit to loads or stores. 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciNote that on Intel systems the memory latency reported is the use-latency, 2362306a36Sopenharmony_cinot the pure load (or store latency). Use latency includes any pipeline 2462306a36Sopenharmony_ciqueueing delays in addition to the memory subsystem latency. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciOn Arm64 this uses SPE to sample load and store operations, therefore hardware 2762306a36Sopenharmony_ciand kernel support is required. See linkperf:perf-arm-spe[1] for a setup guide. 2862306a36Sopenharmony_ciDue to the statistical nature of SPE sampling, not every memory operation will 2962306a36Sopenharmony_cibe sampled. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciOPTIONS 3262306a36Sopenharmony_ci------- 3362306a36Sopenharmony_ci<command>...:: 3462306a36Sopenharmony_ci Any command you can specify in a shell. 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci-i:: 3762306a36Sopenharmony_ci--input=<file>:: 3862306a36Sopenharmony_ci Input file name. 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci-f:: 4162306a36Sopenharmony_ci--force:: 4262306a36Sopenharmony_ci Don't do ownership validation 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci-t:: 4562306a36Sopenharmony_ci--type=<type>:: 4662306a36Sopenharmony_ci Select the memory operation type: load or store (default: load,store) 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci-D:: 4962306a36Sopenharmony_ci--dump-raw-samples:: 5062306a36Sopenharmony_ci Dump the raw decoded samples on the screen in a format that is easy to parse with 5162306a36Sopenharmony_ci one sample per line. 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci-x:: 5462306a36Sopenharmony_ci--field-separator=<separator>:: 5562306a36Sopenharmony_ci Specify the field separator used when dump raw samples (-D option). By default, 5662306a36Sopenharmony_ci The separator is the space character. 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci-C:: 5962306a36Sopenharmony_ci--cpu=<cpu>:: 6062306a36Sopenharmony_ci Monitor only on the list of CPUs provided. Multiple CPUs can be provided as a 6162306a36Sopenharmony_ci comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2. Default 6262306a36Sopenharmony_ci is to monitor all CPUS. 6362306a36Sopenharmony_ci-U:: 6462306a36Sopenharmony_ci--hide-unresolved:: 6562306a36Sopenharmony_ci Only display entries resolved to a symbol. 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci-p:: 6862306a36Sopenharmony_ci--phys-data:: 6962306a36Sopenharmony_ci Record/Report sample physical addresses 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci--data-page-size:: 7262306a36Sopenharmony_ci Record/Report sample data address page size 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ciRECORD OPTIONS 7562306a36Sopenharmony_ci-------------- 7662306a36Sopenharmony_ci-e:: 7762306a36Sopenharmony_ci--event <event>:: 7862306a36Sopenharmony_ci Event selector. Use 'perf mem record -e list' to list available events. 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci-K:: 8162306a36Sopenharmony_ci--all-kernel:: 8262306a36Sopenharmony_ci Configure all used events to run in kernel space. 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci-U:: 8562306a36Sopenharmony_ci--all-user:: 8662306a36Sopenharmony_ci Configure all used events to run in user space. 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci-v:: 8962306a36Sopenharmony_ci--verbose:: 9062306a36Sopenharmony_ci Be more verbose (show counter open errors, etc) 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci--ldlat <n>:: 9362306a36Sopenharmony_ci Specify desired latency for loads event. Supported on Intel and Arm64 9462306a36Sopenharmony_ci processors only. Ignored on other archs. 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ciIn addition, for report all perf report options are valid, and for record 9762306a36Sopenharmony_ciall perf record options. 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ciSEE ALSO 10062306a36Sopenharmony_ci-------- 10162306a36Sopenharmony_cilinkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-arm-spe[1] 102