diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kernel_stat.h | 2 | ||||
| -rw-r--r-- | include/linux/vtime.h | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 66b70780e910..ed5f6ed6eb77 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -127,7 +127,7 @@ extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t) | |||
| 127 | extern void account_steal_time(cputime_t); | 127 | extern void account_steal_time(cputime_t); |
| 128 | extern void account_idle_time(cputime_t); | 128 | extern void account_idle_time(cputime_t); |
| 129 | 129 | ||
| 130 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 130 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
| 131 | static inline void account_process_tick(struct task_struct *tsk, int user) | 131 | static inline void account_process_tick(struct task_struct *tsk, int user) |
| 132 | { | 132 | { |
| 133 | vtime_account_user(tsk); | 133 | vtime_account_user(tsk); |
diff --git a/include/linux/vtime.h b/include/linux/vtime.h index ae30ab58431a..21ef703d1b25 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h | |||
| @@ -14,9 +14,25 @@ extern void vtime_account(struct task_struct *tsk); | |||
| 14 | static inline void vtime_task_switch(struct task_struct *prev) { } | 14 | static inline void vtime_task_switch(struct task_struct *prev) { } |
| 15 | static inline void vtime_account_system(struct task_struct *tsk) { } | 15 | static inline void vtime_account_system(struct task_struct *tsk) { } |
| 16 | static inline void vtime_account_system_irqsafe(struct task_struct *tsk) { } | 16 | static inline void vtime_account_system_irqsafe(struct task_struct *tsk) { } |
| 17 | static inline void vtime_account_user(struct task_struct *tsk) { } | ||
| 17 | static inline void vtime_account(struct task_struct *tsk) { } | 18 | static inline void vtime_account(struct task_struct *tsk) { } |
| 18 | #endif | 19 | #endif |
| 19 | 20 | ||
| 21 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | ||
| 22 | static inline void arch_vtime_task_switch(struct task_struct *tsk) { } | ||
| 23 | static inline void vtime_user_enter(struct task_struct *tsk) | ||
| 24 | { | ||
| 25 | vtime_account_system(tsk); | ||
| 26 | } | ||
| 27 | static inline void vtime_user_exit(struct task_struct *tsk) | ||
| 28 | { | ||
| 29 | vtime_account_user(tsk); | ||
| 30 | } | ||
| 31 | #else | ||
| 32 | static inline void vtime_user_enter(struct task_struct *tsk) { } | ||
| 33 | static inline void vtime_user_exit(struct task_struct *tsk) { } | ||
| 34 | #endif | ||
| 35 | |||
| 20 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING | 36 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING |
| 21 | extern void irqtime_account_irq(struct task_struct *tsk); | 37 | extern void irqtime_account_irq(struct task_struct *tsk); |
| 22 | #else | 38 | #else |
