From c5c061b8f9726bc2c25e19dec227933a13d1e6b7 Mon Sep 17 00:00:00 2001 From: Venki Pallipadi Date: Sun, 15 Jul 2007 23:40:30 -0700 Subject: Add a flag to indicate deferrable timers in /proc/timer_stats Add a flag in /proc/timer_stats to indicate deferrable timers. This will let developers/users to differentiate between types of tiemrs in /proc/timer_stats. Deferrable timer and normal timer will appear in /proc/timer_stats as below. 10D, 1 swapper queue_delayed_work_on (delayed_work_timer_fn) 10, 1 swapper queue_delayed_work_on (delayed_work_timer_fn) Also version of timer_stats changes from v0.1 to v0.2 Signed-off-by: Venkatesh Pallipadi Acked-by: Ingo Molnar Cc: Thomas Gleixner Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/hrtimer.h | 5 +++-- include/linux/timer.h | 15 ++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 17c29dca8354..540799bc85f8 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -329,12 +329,13 @@ extern void sysrq_timer_list_show(void); #ifdef CONFIG_TIMER_STATS extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, - void *timerf, char * comm); + void *timerf, char *comm, + unsigned int timer_flag); static inline void timer_stats_account_hrtimer(struct hrtimer *timer) { timer_stats_update_stats(timer, timer->start_pid, timer->start_site, - timer->function, timer->start_comm); + timer->function, timer->start_comm, 0); } extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, diff --git a/include/linux/timer.h b/include/linux/timer.h index 2b59e6d4219c..78cf899b4409 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -90,16 +90,13 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); */ #ifdef CONFIG_TIMER_STATS +#define TIMER_STATS_FLAG_DEFERRABLE 0x1 + extern void init_timer_stats(void); extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, - void *timerf, char * comm); - -static inline void timer_stats_account_timer(struct timer_list *timer) -{ - timer_stats_update_stats(timer, timer->start_pid, timer->start_site, - timer->function, timer->start_comm); -} + void *timerf, char *comm, + unsigned int timer_flag); extern void __timer_stats_timer_set_start_info(struct timer_list *timer, void *addr); @@ -118,10 +115,6 @@ static inline void init_timer_stats(void) { } -static inline void timer_stats_account_timer(struct timer_list *timer) -{ -} - static inline void timer_stats_timer_set_start_info(struct timer_list *timer) { } -- cgit v1.2.2