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
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user