[RFC PATCH 1/6] timer: expliciyly call timer_stats_timer_set_start_info() in add_timer()

From: Yong Zhang
Date: Sun Aug 29 2010 - 11:05:53 EST


From: Yong Zhang <yong.zhang@xxxxxxxxxxxxx>

Now /proc/timer_stats will show add_timer() as the start_site:
23, 0 swapper add_timer (peer_check_expire)
23, 0 swapper add_timer (addrconf_verify)

This is because add_timer() -> mod_timer() -> __mod_timer(),
but mod_timer() is not inlined. So add_timer() is showed.
Call timer_stats_timer_set_start_info() explicitly to record the
real start_site.

After this change, timer_stats_timer_set_start_info() in workqueue.c
can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
---
kernel/timer.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 97bf05b..2a443cc 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -864,6 +864,7 @@ EXPORT_SYMBOL(mod_timer_pinned);
void add_timer(struct timer_list *timer)
{
BUG_ON(timer_pending(timer));
+ timer_stats_timer_set_start_info(timer);
mod_timer(timer, timer->expires);
}
EXPORT_SYMBOL(add_timer);
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/