diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-14 00:16:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-14 00:16:56 -0400 |
| commit | fc8e1ead9314cf0e0f1922e661428b93d3a50d88 (patch) | |
| tree | f3cb97c4769b74f6627a59769f1ed5c92a13c58a /include/linux/kernel_stat.h | |
| parent | 2bcaa6a4238094c5695d5b1943078388d82d3004 (diff) | |
| parent | 9de48cc300fb10f7d9faa978670becf5e352462a (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/kernel_stat.h')
| -rw-r--r-- | include/linux/kernel_stat.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 0c8b89f28a95..348fa8874b52 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
| 6 | #include <linux/percpu.h> | 6 | #include <linux/percpu.h> |
| 7 | #include <linux/cpumask.h> | 7 | #include <linux/cpumask.h> |
| 8 | #include <linux/interrupt.h> | ||
| 8 | #include <asm/irq.h> | 9 | #include <asm/irq.h> |
| 9 | #include <asm/cputime.h> | 10 | #include <asm/cputime.h> |
| 10 | 11 | ||
| @@ -31,6 +32,7 @@ struct kernel_stat { | |||
| 31 | #ifndef CONFIG_GENERIC_HARDIRQS | 32 | #ifndef CONFIG_GENERIC_HARDIRQS |
| 32 | unsigned int irqs[NR_IRQS]; | 33 | unsigned int irqs[NR_IRQS]; |
| 33 | #endif | 34 | #endif |
| 35 | unsigned int softirqs[NR_SOFTIRQS]; | ||
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 36 | DECLARE_PER_CPU(struct kernel_stat, kstat); | 38 | DECLARE_PER_CPU(struct kernel_stat, kstat); |
| @@ -67,6 +69,16 @@ extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | |||
| 67 | 69 | ||
| 68 | #endif | 70 | #endif |
| 69 | 71 | ||
| 72 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | ||
| 73 | { | ||
| 74 | kstat_this_cpu.softirqs[irq]++; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | ||
| 78 | { | ||
| 79 | return kstat_cpu(cpu).softirqs[irq]; | ||
| 80 | } | ||
| 81 | |||
| 70 | /* | 82 | /* |
| 71 | * Number of interrupts per specific IRQ source, since bootup | 83 | * Number of interrupts per specific IRQ source, since bootup |
| 72 | */ | 84 | */ |
| @@ -81,7 +93,12 @@ static inline unsigned int kstat_irqs(unsigned int irq) | |||
| 81 | return sum; | 93 | return sum; |
| 82 | } | 94 | } |
| 83 | 95 | ||
| 96 | |||
| 97 | /* | ||
| 98 | * Lock/unlock the current runqueue - to extract task statistics: | ||
| 99 | */ | ||
| 84 | extern unsigned long long task_delta_exec(struct task_struct *); | 100 | extern unsigned long long task_delta_exec(struct task_struct *); |
| 101 | |||
| 85 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); | 102 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); |
| 86 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); | 103 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); |
| 87 | extern void account_steal_time(cputime_t); | 104 | extern void account_steal_time(cputime_t); |
