public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Zhaolei <zhaolei@cn.fujitsu.com>,
	kosaki.motohiro@jp.fujitsu.com,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] ftrace: add tracepoint for timer
Date: Tue, 7 Jul 2009 19:39:50 +0200	[thread overview]
Message-ID: <20090707173948.GC6184@nowhere> (raw)
In-Reply-To: <4A531532.4010803@cn.fujitsu.com>

On Tue, Jul 07, 2009 at 05:28:18PM +0800, Xiao Guangrong wrote:
> 
> 
> Thomas Gleixner wrote:
> > On Mon, 6 Jul 2009, Xiao Guangrong wrote:
> >> Changelog v1->v2:
> >> 1: Add jiffies info into timer
> >> 2: Combine debugobjects and trace as Thomas's suggestion
> > 
> > I like it that way. Some minor nitpicks below.
> >  
> >> +TRACE_EVENT(timer_expire,
> >> +
> >> +	TP_PROTO(struct timer_list *timer),
> >> +
> >> +	TP_ARGS(timer),
> >> +
> >> +	TP_STRUCT__entry(
> >> +		__field( void *,	timer		)
> >> +		__field( void *,	function	)
> > 
> >   Do we really need the function here? It does not change between
> >   start and expiry.
> > 
> 
> Yeah, I'll fix.
> 
> >> +TRACE_EVENT(timer_cancel,
> >> +
> >> +	TP_PROTO(struct timer_list *timer),
> >> +
> >> +	TP_ARGS(timer),
> >> +
> >> +	TP_STRUCT__entry(
> >> +		__field( void *,	timer		)
> >> +		__field( void *,	function	)
> > 
> >   Ditto.
> > 
> 
> Will fix.
> 
> >> +
> >> +static inline void debug_and_trace_timer_expire(struct timer_list *timer)
> > 
> >   Technically not really necessary. The debug code does not care about
> >   it.
> > 
> 
> Will fix.
> 
> >>  			timer = list_first_entry(head, struct timer_list,entry);
> >> +			debug_and_trace_timer_expire(timer);
> >>  			fn = timer->function;
> >>  			data = timer->data;
> >>  
> > 
> > Can you please add the tracepoint which was suggested by Anton (IIRC)
> > which allows us to measure the execution time of the callback function
> > ? There is no need to dereference timer in the expiry tracepoint, we
> > just store the pointer. So we can safely move the tracepoints just
> > around the function call.
> > 
> >    trace_timer_expire(timer);
> >    fn(data);
> >    trace_timer_callback_done(timer);
> > 
> > Or whatever fancy name you come up with.
> > 
> 
> OK, I'll fix it base on your suggestion.
>  
> trace_timer_expire/trace_timer_callback_done are already in Frederic' tree
> but with different name, see below URL:
>  	http://marc.info/?l=linux-kernel&m=124331396919301&w=2
>  
> I'll modify those tracepoint's name to match ours.
>  
> Thank you very much!
>  
> Xiao


If you wish so, I can gather your patches with the one of Anton Blanchard
and send a pull request once it's acked.

Thanks,
Frederic.


  reply	other threads:[~2009-07-07 17:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06  9:37 [PATCH v2 0/3] ftrace: add tracepoint for timer event Xiao Guangrong
2009-07-06  9:39 ` [PATCH v2 1/3] ftrace: add tracepoint for timer Xiao Guangrong
2009-07-06 20:08   ` Thomas Gleixner
2009-07-07  9:28     ` Xiao Guangrong
2009-07-07 17:39       ` Frederic Weisbecker [this message]
2009-07-06  9:41 ` [PATCH v2 2/3] ftrace: add tracepoint for hrtimer Xiao Guangrong
2009-07-06 20:12   ` Thomas Gleixner
2009-07-15  1:33     ` Xiao Guangrong
2009-07-06  9:42 ` [PATCH v2 3/3] ftrace: add tracepoint for itimer Xiao Guangrong
2009-07-06 13:31   ` Mathieu Desnoyers
2009-07-06 19:37     ` Thomas Gleixner
2009-07-07 14:06       ` Mathieu Desnoyers
2009-07-07 16:03         ` Thomas Gleixner
2009-07-06 19:17   ` Thomas Gleixner
2009-07-07  9:30     ` Xiao Guangrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090707173948.GC6184@nowhere \
    --to=fweisbec@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=xiaoguangrong@cn.fujitsu.com \
    --cc=zhaolei@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox