timer stats: fix quick check optimization
commitf9f868dbcca961ed62f1df1d114abd0c38c47dce
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 9 Jul 2009 09:24:26 +0000 (9 11:24 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 10 Jul 2009 17:33:00 +0000 (10 19:33 +0200)
tree97cf348e0d03119d9b3a0f98cd86f8c793b9d250
parent6ff7041dbfeb3bd7dfe9aa67275c21199ef760d6
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>
include/linux/hrtimer.h