aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-07-09 05:24:26 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-07-10 13:33:00 -0400
commitf9f868dbcca961ed62f1df1d114abd0c38c47dce (patch)
tree97cf348e0d03119d9b3a0f98cd86f8c793b9d250 /include/linux/hrtimer.h
parent6ff7041dbfeb3bd7dfe9aa67275c21199ef760d6 (diff)
timer stats: fix quick check optimization
git commit 507e1231 "timer stats: Optimize by adding quick check to avoid function calls" added one wrong check so that one unnecessary function call isn't elimated. time_stats_account_hrtimer() checks if timer->start_pid isn't initialized in order to find out if timer_stats_update_stats() should be called. However start_pid is initialized with -1 instead of 0, so that the function call always happens. Check timer->start_site like in timer_stats_account_timer() to fix this. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 54648e625efd..4759917adc71 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -448,7 +448,7 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
448 448
449static inline void timer_stats_account_hrtimer(struct hrtimer *timer) 449static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
450{ 450{
451 if (likely(!timer->start_pid)) 451 if (likely(!timer->start_site))
452 return; 452 return;
453 timer_stats_update_stats(timer, timer->start_pid, timer->start_site, 453 timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
454 timer->function, timer->start_comm, 0); 454 timer->function, timer->start_comm, 0);