timer stats: Optimize by adding quick check to avoid function calls
[safe/jmp/linux-2.6] / kernel / timer.c
index 54d3912..0b36b9e 100644 (file)
@@ -380,6 +380,8 @@ static void timer_stats_account_timer(struct timer_list *timer)
 {
        unsigned int flag = 0;
 
+       if (likely(!timer->start_site))
+               return;
        if (unlikely(tbase_get_deferrable(timer->base)))
                flag |= TIMER_STATS_FLAG_DEFERRABLE;