summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/intel_pt.h
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2019-08-06 11:46:01 +0300
committerPeter Zijlstra <peterz@infradead.org>2019-08-28 11:29:39 +0200
commit42880f726c66f13ae1d9ac9ce4c43abe64ecac84 (patch)
tree24a24d94033bc9c19e1e9356467d04b47f8e668e /arch/x86/include/asm/intel_pt.h
parentab43762ef010967e4ccd53627f70a2eecbeafefb (diff)
downloadlinux-stable-42880f726c66f13ae1d9ac9ce4c43abe64ecac84.tar.gz
linux-stable-42880f726c66f13ae1d9ac9ce4c43abe64ecac84.tar.bz2
linux-stable-42880f726c66f13ae1d9ac9ce4c43abe64ecac84.zip
perf/x86/intel: Support PEBS output to PT
If PEBS declares ability to output its data to Intel PT stream, use the aux_output attribute bit to enable PEBS data output to PT. This requires a PT event to be present and scheduled in the same context. Unlike the DS area, the kernel does not extract PEBS records from the PT stream to generate corresponding records in the perf stream, because that would require real time in-kernel PT decoding, which is not feasible. The PMI, however, can still be used. The output setting is per-CPU, so all PEBS events must be either writing to PT or to the DS area, therefore, in case of conflict, the conflicting event will fail to schedule, allowing the rotation logic to alternate between the PEBS->PT and PEBS->DS events. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: kan.liang@linux.intel.com Link: https://lkml.kernel.org/r/20190806084606.4021-3-alexander.shishkin@linux.intel.com
Diffstat (limited to 'arch/x86/include/asm/intel_pt.h')
-rw-r--r--arch/x86/include/asm/intel_pt.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/intel_pt.h b/arch/x86/include/asm/intel_pt.h
index 634f99b1dc22..423b788f495e 100644
--- a/arch/x86/include/asm/intel_pt.h
+++ b/arch/x86/include/asm/intel_pt.h
@@ -28,10 +28,12 @@ enum pt_capabilities {
void cpu_emergency_stop_pt(void);
extern u32 intel_pt_validate_hw_cap(enum pt_capabilities cap);
extern u32 intel_pt_validate_cap(u32 *caps, enum pt_capabilities cap);
+extern int is_intel_pt_event(struct perf_event *event);
#else
static inline void cpu_emergency_stop_pt(void) {}
static inline u32 intel_pt_validate_hw_cap(enum pt_capabilities cap) { return 0; }
static inline u32 intel_pt_validate_cap(u32 *caps, enum pt_capabilities capability) { return 0; }
+static inline int is_intel_pt_event(struct perf_event *event) { return 0; }
#endif
#endif /* _ASM_X86_INTEL_PT_H */