lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] ftrace: add tracepoint for hrtimer
Hi Thomas,

Thomas Gleixner wrote:
>
> Here I'd like to see a callback_done entry as well, so we can check
> for long lasting callbacks.
>

I am trying to address your comment that move trace_timer_expires()
form hrtimer_interrupt()/hrtimer_run_queues() to __run_hrtimer() to
trace the execution time of hrtimer's callback, like below:

__run_hrtimer()
{
.....
+ trace_hrtimer_expires();
restart = fn(timer);
+ trace_hrtimer_callback_done();
......
}

But I meet a problem here that I can't get the timestamps when hrtimer
expires in __run_hrtimer(), which is used to calculate the latency of
hrtimer. I think it's Ok to not move trace_hrtimer_expires(), that is:

hrtimer_interrupt()
{
......
+ trace_hrtimer_expires();
__run_hrtimer(timer);
......
}

__run_hrtimer()
{
......
restart = fn(timer);
+ trace_hrtimer_callback_done();
......
}

But if more accurate execution time is a require, we'd better use the
tracepoints added by Anton Blanchard <anton@samba.org>. That is:

hrtimer_interrupt()
{
......
+ trace_hrtimer_expires();
__run_hrtimer(timer);
......
}

__run_hrtimer()
{
......
+ trace_hrtimer_callback_entry()
restart = fn(timer);
+ trace_hrtimer_callback_exit();
......
}


Thanks,
Xiao


\
 
 \ /
  Last update: 2009-07-15 03:35    [W:0.465 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site