aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel_stat.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-10 20:42:53 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-10 20:42:53 -0500
commit506c10f26c481b7f8ef27c1c79290f68989b2e9e (patch)
tree03de82e812f00957aa6276dac2fe51c3358e88d7 /include/linux/kernel_stat.h
parente1df957670aef74ffd9a4ad93e6d2c90bf6b4845 (diff)
parentc59765042f53a79a7a65585042ff463b69cb248c (diff)
Merge commit 'v2.6.29-rc1' into perfcounters/core
Conflicts: include/linux/kernel_stat.h
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r--include/linux/kernel_stat.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 1b2e3242497c..ecfa66817634 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -28,7 +28,9 @@ struct cpu_usage_stat {
28 28
29struct kernel_stat { 29struct kernel_stat {
30 struct cpu_usage_stat cpustat; 30 struct cpu_usage_stat cpustat;
31 unsigned int irqs[NR_IRQS]; 31#ifndef CONFIG_SPARSE_IRQ
32 unsigned int irqs[NR_IRQS];
33#endif
32}; 34};
33 35
34DECLARE_PER_CPU(struct kernel_stat, kstat); 36DECLARE_PER_CPU(struct kernel_stat, kstat);
@@ -39,6 +41,10 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
39 41
40extern unsigned long long nr_context_switches(void); 42extern unsigned long long nr_context_switches(void);
41 43
44#ifndef CONFIG_SPARSE_IRQ
45#define kstat_irqs_this_cpu(irq) \
46 (kstat_this_cpu.irqs[irq])
47
42struct irq_desc; 48struct irq_desc;
43 49
44static inline void kstat_incr_irqs_this_cpu(unsigned int irq, 50static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
@@ -46,11 +52,17 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
46{ 52{
47 kstat_this_cpu.irqs[irq]++; 53 kstat_this_cpu.irqs[irq]++;
48} 54}
55#endif
56
49 57
58#ifndef CONFIG_SPARSE_IRQ
50static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) 59static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
51{ 60{
52 return kstat_cpu(cpu).irqs[irq]; 61 return kstat_cpu(cpu).irqs[irq];
53} 62}
63#else
64extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
65#endif
54 66
55/* 67/*
56 * Number of interrupts per specific IRQ source, since bootup 68 * Number of interrupts per specific IRQ source, since bootup
@@ -75,10 +87,13 @@ extern void curr_rq_unlock_irq_restore(unsigned long *flags);
75extern unsigned long long __task_delta_exec(struct task_struct *tsk, int update); 87extern unsigned long long __task_delta_exec(struct task_struct *tsk, int update);
76extern unsigned long long task_delta_exec(struct task_struct *); 88extern unsigned long long task_delta_exec(struct task_struct *);
77 89
78extern void account_user_time(struct task_struct *, cputime_t); 90extern void account_user_time(struct task_struct *, cputime_t, cputime_t);
79extern void account_user_time_scaled(struct task_struct *, cputime_t); 91extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t);
80extern void account_system_time(struct task_struct *, int, cputime_t); 92extern void account_steal_time(cputime_t);
81extern void account_system_time_scaled(struct task_struct *, cputime_t); 93extern void account_idle_time(cputime_t);
82extern void account_steal_time(struct task_struct *, cputime_t); 94
95extern void account_process_tick(struct task_struct *, int user);
96extern void account_steal_ticks(unsigned long ticks);
97extern void account_idle_ticks(unsigned long ticks);
83 98
84#endif /* _LINUX_KERNEL_STAT_H */ 99#endif /* _LINUX_KERNEL_STAT_H */