summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/uapi/asm/msr-index.h
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2013-01-24 16:10:32 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-04-01 12:16:31 -0300
commitf20093eef5f7843a25adfc0512617d4b1ff1aa6e (patch)
tree1e1d008f98adab4477e3803ed24f3f2a22b34aaf /arch/x86/include/uapi/asm/msr-index.h
parentd6be9ad6c960f43800a6f118932bc8a5a4eadcd1 (diff)
downloadop-kernel-dev-f20093eef5f7843a25adfc0512617d4b1ff1aa6e.zip
op-kernel-dev-f20093eef5f7843a25adfc0512617d4b1ff1aa6e.tar.gz
perf/x86: Add memory profiling via PEBS Load Latency
This patch adds support for memory profiling using the PEBS Load Latency facility. Load accesses are sampled by HW and the instruction address, data address, load latency, data source, tlb, locked information can be saved in the sampling buffer if using the PERF_SAMPLE_COST (for latency), PERF_SAMPLE_ADDR, PERF_SAMPLE_DATA_SRC types. To enable PEBS Load Latency, users have to use the model specific event: - on NHM/WSM: MEM_INST_RETIRED:LATENCY_ABOVE_THRESHOLD - on SNB/IVB: MEM_TRANS_RETIRED:LATENCY_ABOVE_THRESHOLD To make things easier, this patch also exports a generic alias via sysfs: mem-loads. It export the right event encoding based on the host CPU and can be used directly by the perf tool. Loosely based on Intel's Lin Ming patch posted on LKML in July 2011. Signed-off-by: Stephane Eranian <eranian@google.com> Cc: peterz@infradead.org Cc: ak@linux.intel.com Cc: acme@redhat.com Cc: jolsa@redhat.com Cc: namhyung.kim@lge.com Link: http://lkml.kernel.org/r/1359040242-8269-9-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch/x86/include/uapi/asm/msr-index.h')
-rw-r--r--arch/x86/include/uapi/asm/msr-index.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/msr-index.h b/arch/x86/include/uapi/asm/msr-index.h
index 892ce40..b31798d 100644
--- a/arch/x86/include/uapi/asm/msr-index.h
+++ b/arch/x86/include/uapi/asm/msr-index.h
@@ -71,6 +71,7 @@
#define MSR_IA32_PEBS_ENABLE 0x000003f1
#define MSR_IA32_DS_AREA 0x00000600
#define MSR_IA32_PERF_CAPABILITIES 0x00000345
+#define MSR_PEBS_LD_LAT_THRESHOLD 0x000003f6
#define MSR_MTRRfix64K_00000 0x00000250
#define MSR_MTRRfix16K_80000 0x00000258
OpenPOWER on IntegriCloud