summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-01-31 20:34:06 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-02-17 14:02:49 +1100
commit89713ed10815401a1bfe12e3a076b64048381b56 (patch)
tree2d9ce51782997e3ed265dbee7c72c3e7b0c776e3 /arch/powerpc/kernel/traps.c
parentfc380c0c8a17bc2bd2d9d7fb41d4a88c3e618db2 (diff)
downloadtalos-obmc-linux-89713ed10815401a1bfe12e3a076b64048381b56.tar.gz
talos-obmc-linux-89713ed10815401a1bfe12e3a076b64048381b56.zip
powerpc: Add timer, performance monitor and machine check counts to /proc/interrupts
With NO_HZ it is useful to know how often the decrementer is going off. The patch below adds an entry for it and also adds it into the /proc/stat summaries. While here, I added performance monitoring and machine check exceptions. I found it useful to keep an eye on the PMU exception rate when using the perf tool. Since it's possible to take a completely handled machine check on a System p box it also sounds like a good idea to keep a machine check summary. The event naming matches x86 to keep gratuitous differences to a minimum. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 0a320dbd950a..895da29e7db8 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -483,6 +483,8 @@ void machine_check_exception(struct pt_regs *regs)
{
int recover = 0;
+ __get_cpu_var(irq_stat).mce_exceptions++;
+
/* See if any machine dependent calls. In theory, we would want
* to call the CPU first, and call the ppc_md. one if the CPU
* one returns a positive number. However there is existing code
@@ -965,6 +967,8 @@ void vsx_unavailable_exception(struct pt_regs *regs)
void performance_monitor_exception(struct pt_regs *regs)
{
+ __get_cpu_var(irq_stat).pmu_irqs++;
+
perf_irq(regs);
}
OpenPOWER on IntegriCloud