diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-03 04:39:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-08 09:47:15 -0500 |
commit | 241771ef016b5c0c83cd7a4372a74321c973c1e6 (patch) | |
tree | 5893d72f1721af34daee82f27449bd35c9f65363 /arch/x86/kernel/irq.c | |
parent | e7bc62b6b3aeaa8849f8383e0cfb7ca6c003adc6 (diff) |
performance counters: x86 support
Implement performance counters for x86 Intel CPUs.
It's simplified right now: the PERFMON CPU feature is assumed,
which is available in Core2 and later Intel CPUs.
The design is flexible to be extended to more CPU types as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irq.c')
-rw-r--r-- | arch/x86/kernel/irq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index d1d4dc52f649..d92bc71e41a7 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -56,6 +56,10 @@ static int show_other_interrupts(struct seq_file *p) | |||
56 | for_each_online_cpu(j) | 56 | for_each_online_cpu(j) |
57 | seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs); | 57 | seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs); |
58 | seq_printf(p, " Local timer interrupts\n"); | 58 | seq_printf(p, " Local timer interrupts\n"); |
59 | seq_printf(p, "CNT: "); | ||
60 | for_each_online_cpu(j) | ||
61 | seq_printf(p, "%10u ", irq_stats(j)->apic_perf_irqs); | ||
62 | seq_printf(p, " Performance counter interrupts\n"); | ||
59 | #endif | 63 | #endif |
60 | #ifdef CONFIG_SMP | 64 | #ifdef CONFIG_SMP |
61 | seq_printf(p, "RES: "); | 65 | seq_printf(p, "RES: "); |
@@ -160,6 +164,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
160 | 164 | ||
161 | #ifdef CONFIG_X86_LOCAL_APIC | 165 | #ifdef CONFIG_X86_LOCAL_APIC |
162 | sum += irq_stats(cpu)->apic_timer_irqs; | 166 | sum += irq_stats(cpu)->apic_timer_irqs; |
167 | sum += irq_stats(cpu)->apic_perf_irqs; | ||
163 | #endif | 168 | #endif |
164 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
165 | sum += irq_stats(cpu)->irq_resched_count; | 170 | sum += irq_stats(cpu)->irq_resched_count; |