summaryrefslogtreecommitdiffstats
path: root/include/linux/timer.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-28 11:05:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-28 11:05:16 -0700
commit187dd317f0169142e4adf6263852f93c3b6f6a3c (patch)
treec539ad11655d4545c5ef4b54cbecd9cff9cff974 /include/linux/timer.h
parent9b71272b6ad4966481d73e6abf3ae4bbc3bdabd5 (diff)
parent507e123151149e578c9aae33eb876c49824da5f8 (diff)
downloadblackbird-op-linux-187dd317f0169142e4adf6263852f93c3b6f6a3c.tar.gz
blackbird-op-linux-187dd317f0169142e4adf6263852f93c3b6f6a3c.zip
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: timer stats: Optimize by adding quick check to avoid function calls timers: Fix timer_migration interface which accepts any number as input
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r--include/linux/timer.h4
1 files changed, 4 insertions, 0 deletions
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));
}
OpenPOWER on IntegriCloud