linux/tools/perf/scripts/python
Kan Liang 41013f0c09 perf script python: Add script to profile and resolve physical mem type
There could be different types of memory in the system. E.g normal
System Memory, Persistent Memory. To understand how the workload maps to
those memories, it's important to know the I/O statistics of them.  Perf
can collect physical addresses, but those are raw data.  It still needs
extra work to resolve the physical addresses.  Provide a script to
facilitate the physical addresses resolving and I/O statistics.

Profile with MEM_INST_RETIRED.ALL_LOADS or MEM_UOPS_RETIRED.ALL_LOADS
event if any of them is available.

Look up the /proc/iomem and resolve the physical address.  Provide
memory type summary.

Here is an example output:

  # perf script report mem-phys-addr
  Event: mem_inst_retired.all_loads:P
  Memory type                                    count   percentage
  ----------------------------------------  -----------  -----------
  System RAM                                        74        53.2%
  Persistent Memory                                 55        39.6%
  N/A

  ---

Changes since V2:
 - Apply the new license rules.
 - Add comments for globals

Changes since V1:
 - Do not mix DLA and Load Latency. Do not compare the loads and stores.
   Only profile the loads.
 - Use event name to replace the RAW event

Signed-off-by: Kan Liang <Kan.liang@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lkml.kernel.org/r/1515099595-34770-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-01-12 11:06:57 -03:00
..
bin perf script python: Add script to profile and resolve physical mem type 2018-01-12 11:06:57 -03:00
Perf-Trace-Util License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
call-graph-from-sql.py perf script python: Add support for sqlite3 to call-graph-from-sql.py 2017-08-15 17:03:38 -03:00
check-perf-trace.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
compaction-times.py perf scripts python: Add new compaction-times script 2015-08-28 14:53:40 -03:00
event_analyzing_sample.py License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
export-to-postgresql.py perf script python: Rename call-graph-from-postgresql.py to call-graph-from-sql.py 2017-08-15 16:38:06 -03:00
export-to-sqlite.py perf script python: Add support for exporting to sqlite3 2017-08-15 16:37:55 -03:00
failed-syscalls-by-pid.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
futex-contention.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
intel-pt-events.py perf intel-pt: Add example script for power events and PTWRITE 2017-06-30 11:50:53 -03:00
mem-phys-addr.py perf script python: Add script to profile and resolve physical mem type 2018-01-12 11:06:57 -03:00
net_dropmonitor.py License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netdev-times.py License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sched-migration.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
sctop.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
stackcollapse.py License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stat-cpi.py License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall-counts-by-pid.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
syscall-counts.py perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00