diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-24 12:56:25 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-24 12:56:25 +0200 |
commit | 65fb32d094bbd89df43c858a6c27728edbf178b2 (patch) | |
tree | e855f90567a0a4ab70604b7cd9fe58e92df19957 /include | |
parent | 4e8a2372f9255a1464ef488ed925455f53fbdaa1 (diff) | |
parent | 507e123151149e578c9aae33eb876c49824da5f8 (diff) |
Merge branch 'timers/urgent' into auto-timers-next
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hrtimer.h | 5 | ||||
-rw-r--r-- | include/linux/timer.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 7400900de94a..54648e625efd 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -21,6 +21,7 @@ #include <linux/list.h> #include <linux/wait.h> #include <linux/percpu.h> +#include <linux/timer.h> struct hrtimer_clock_base; @@ -447,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, static inline void timer_stats_account_hrtimer(struct hrtimer *timer) { + if (likely(!timer->start_pid)) + return; timer_stats_update_stats(timer, timer->start_pid, timer->start_site, timer->function, timer->start_comm, 0); } @@ -456,6 +459,8 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) { + if (likely(!timer_stats_active)) + return; __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); } diff --git a/include/linux/timer.h b/include/linux/timer.h index ccf882eed8f8..be62ec2ebea5 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -190,6 +190,8 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); */ #ifdef CONFIG_TIMER_STATS +extern int timer_stats_active; + #define TIMER_STATS_FLAG_DEFERRABLE 0x1 extern void init_timer_stats(void); @@ -203,6 +205,8 @@ extern void __timer_stats_timer_set_start_info(struct timer_list *timer, static inline void timer_stats_timer_set_start_info(struct timer_list *timer) { + if (likely(!timer_stats_active)) + return; __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); } |