lkml.org 
[lkml]   [2010]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 1/6] timer: expliciyly call timer_stats_timer_set_start_info() in add_timer()
Date
From: Yong Zhang <yong.zhang@windriver.com>

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@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
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


\
 
 \ /
  Last update: 2010-08-29 17:09    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site