summaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/x86/tests/arch-tests.c
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/tests/arch-tests.c
parentd8b167f9d8af817073ee35cf904e2e527465dbc1 (diff)
downloadop-kernel-dev-035827e9f2bd71a280f4eb58c65811d377ab2217.zip
op-kernel-dev-035827e9f2bd71a280f4eb58c65811d377ab2217.tar.gz
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/tests/arch-tests.c')
-rw-r--r--tools/perf/arch/x86/tests/arch-tests.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/tests/arch-tests.c
index d116c21..2218cb6 100644
--- a/tools/perf/arch/x86/tests/arch-tests.c
+++ b/tools/perf/arch/x86/tests/arch-tests.c
@@ -24,6 +24,10 @@ struct test arch_tests[] = {
},
#endif
{
+ .desc = "Test intel cqm nmi context read",
+ .func = test__intel_cqm_count_nmi_context,
+ },
+ {
.func = NULL,
},
OpenPOWER on IntegriCloud