summaryrefslogtreecommitdiff
path: root/tools/perf/arch/x86/include/arch-tests.h
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2015-10-05 15:40:21 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-05 16:56:07 -0300
commit035827e9f2bd71a280f4eb58c65811d377ab2217 (patch)
treefd989e82be49f2363d7c9b5dc0e4ddb86fbe4eaa /tools/perf/arch/x86/include/arch-tests.h
parentd8b167f9d8af817073ee35cf904e2e527465dbc1 (diff)
perf tests: Add Intel CQM test
Peter reports that it's possible to trigger a WARN_ON_ONCE() in the Intel CQM code by combining a hardware event and an Intel CQM (software) event into a group. Unfortunately, the perf tools are not able to create this bundle and we need to manually construct a test case. For posterity, record Peter's proof of concept test case in tools/perf so that it presents a model for how we can perform architecture specific tests, or "arch tests", in perf in the future. The particular issue triggered in the test case is that when the counter for the hardware event overflows and triggers a PMI we'll read both the hardware event and the software event counters. Unfortunately, for CQM that involves performing an IPI to read the CQM event counters on all sockets, which in NMI context triggers the WARN_ON_ONCE(). Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kanaka Juvva <kanaka.d.juvva@intel.com> Cc: Vikas Shivappa <vikas.shivappa@intel.com> Cc: Vince Weaver <vince@deater.net> Link: http://lkml.kernel.org/r/1437490509-15373-1-git-send-email-matt@codeblueprint.co.uk Link: http://lkml.kernel.org/n/tip-3p4ra0u8vzm7m289a1m799kf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/arch/x86/include/arch-tests.h')
-rw-r--r--tools/perf/arch/x86/include/arch-tests.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/include/arch-tests.h b/tools/perf/arch/x86/include/arch-tests.h
index 5927cf224325..7ed00f4b0908 100644
--- a/tools/perf/arch/x86/include/arch-tests.h
+++ b/tools/perf/arch/x86/include/arch-tests.h
@@ -5,6 +5,7 @@
int test__rdpmc(void);
int test__perf_time_to_tsc(void);
int test__insn_x86(void);
+int test__intel_cqm_count_nmi_context(void);
#ifdef HAVE_DWARF_UNWIND_SUPPORT
struct thread;