Commit 65d92064 authored by Michael Cree's avatar Michael Cree Committed by Linus Torvalds

alpha: add performance monitor interrupt counter

The following patches implement hardware performance events for the Alpha
EV67 and later CPUs.  I have had this running on a Compaq XP1000 (EV67,
single CPU) for a few days now.  Pretty cool -- discovered that the glibc
exp2() library routine uses on average 985 cycles to execute 777 CPU
instructions whereas Compaq's CPML library version of exp2() uses on
average 32 cycles to execute 47 CPU instructions to achieve the same

This patch:

Add performance monitor interrupt counternd and export the count to user
space via /proc/interrupts.
Signed-off-by: default avatarMichael Cree <>
Cc: Richard Henderson <>
Cc: Ivan Kokshaysky <>
Cc: Matt Turner <>
Cc: Thomas Gleixner <>
Cc: Peter Zijlstra <>
Cc: Ingo Molnar <>
Cc: Jay Estabrook <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7624ee72
......@@ -3,6 +3,7 @@
extern volatile unsigned long irq_err_count;
DECLARE_PER_CPU(unsigned long, irq_pmi_count);
#define ACTUAL_NR_IRQS alpha_mv.nr_irqs
......@@ -31,6 +31,7 @@
#include <asm/uaccess.h>
volatile unsigned long irq_err_count;
DEFINE_PER_CPU(unsigned long, irq_pmi_count);
void ack_bad_irq(unsigned int irq)
......@@ -63,9 +64,7 @@ int irq_select_affinity(unsigned int irq)
show_interrupts(struct seq_file *p, void *v)
int j;
int irq = *(loff_t *) v;
struct irqaction * action;
unsigned long flags;
......@@ -112,6 +111,10 @@ show_interrupts(struct seq_file *p, void *v)
seq_printf(p, "%10lu ", cpu_data[j].ipi_count);
seq_putc(p, '\n');
seq_puts(p, "PMI: ");
seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j));
seq_puts(p, " Performance Monitoring\n");
seq_printf(p, "ERR: %10lu\n", irq_err_count);
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment