[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348806696-31170-27-git-send-email-andi@firstfloor.org>
Date: Thu, 27 Sep 2012 21:31:31 -0700
From: Andi Kleen <andi@...stfloor.org>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org, a.p.zijlstra@...llo.nl, eranian@...gle.com,
acme@...hat.com, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 26/31] perf, x86: Support for printing PMU state on spurious PMIs
From: Andi Kleen <ak@...ux.intel.com>
I had some problems with spurious PMIs, so print the PMU state
on a spurious one. This will not interact well with other NMI users.
Disabled by default, has to be explicitely enabled through sysfs.
Optional, but useful for debugging.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
arch/x86/kernel/cpu/perf_event_intel.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index be0d3c8..baf78e0 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -12,6 +12,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/export.h>
+#include <linux/moduleparam.h>
#include <asm/cpufeature.h>
#include <asm/hardirq.h>
@@ -19,6 +20,9 @@
#include "perf_event.h"
+static bool print_spurious_pmi __read_mostly;
+module_param(print_spurious_pmi, bool, 0644);
+
/*
* Intel PerfMon, used on Core and later.
*/
@@ -1237,6 +1241,10 @@ again:
goto again;
done:
+ if (!handled && print_spurious_pmi) {
+ pr_debug("Spurious PMI\n");
+ perf_event_print_debug();
+ }
intel_pmu_enable_all(0);
return handled;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists