]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation
authorSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Wed, 5 Jun 2013 21:11:49 +0000 (16:11 -0500)
committerIngo Molnar <mingo@kernel.org>
Wed, 19 Jun 2013 11:04:53 +0000 (13:04 +0200)
commit006a3bd4519e4f893d2edc39f42581323c389f3d
tree8120dcc5ba7c63669447d74f2d1f0458dd7fc0d3
parentfdd1e54b62af640bc33ec1e4961eee619b6f06ff
perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation

Implement a perf PMU to handle IOMMU performance counters and events.
The PMU only supports counting mode (e.g. perf stat). Since the counters
are shared across all cores, the PMU is implemented as "system-wide" mode.

To invoke the AMD IOMMU PMU, issue a perf tool command such as:

  ./perf stat -a -e amd_iommu/<events>/ <command>

or:

  ./perf stat -a -e amd_iommu/config=<config-data>,config1=<config1-data>/ <command>

For example:

  ./perf stat -a -e amd_iommu/mem_trans_total/ <command>

The resulting count will be how many IOMMU total peripheral memory
operations were performed during the command execution window.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1370466709-3212-3-git-send-email-suravee.suthikulpanit@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/Makefile
arch/x86/kernel/cpu/perf_event_amd_iommu.c [new file with mode: 0644]
arch/x86/kernel/cpu/perf_event_amd_iommu.h [new file with mode: 0644]