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)
commit7be6296fdd75f716f7348251433ea68c4b362cf3
tree8120dcc5ba7c63669447d74f2d1f0458dd7fc0d3
parent30861ddc9cca479a7fc6a5efef4e5c69d6b274f4
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]