[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0905262334030.1762@localhost.localdomain>
Date: Tue, 26 May 2009 23:40:34 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
cc: mingo@...e.hu, LKML <linux-kernel@...r.kernel.org>,
Zhaolei <zhaolei@...fujitsu.com>, kosaki.motohiro@...fujitsu.com,
Steven Rostedt <rostedt@...dmis.org>, fweisbec@...il.com
Subject: Re: [PATCH 1/3] ftrace: add tracepoint for timer
On Fri, 22 May 2009, Xiao Guangrong wrote:
> This patch is modify from Mathieu's patch base on ingo's suggestion, the original patch
> can be found here:
> http://marc.info/?l=linux-kernel&m=123791201816247&w=2
I have a hard time to connect this patch to the original one.
> +TRACE_EVENT(timer_start,
> +
> + TP_PROTO(struct timer_list *timer, int cpu),
> +
> + TP_ARGS(timer, cpu),
> +
> + TP_STRUCT__entry(
> + __field( void *, timer )
> + __field( void *, function )
> + __field( unsigned long, expires )
> + __field( int, cpu )
> + ),
> +
> + TP_fast_assign(
> + __entry->timer = timer;
> + __entry->function = timer->function;
> + __entry->expires = timer->expires;
> + __entry->cpu = cpu;
> + ),
> +
> + TP_printk("timer=%p func=%pf expires=%lu cpu=%d", __entry->timer,
> + __entry->function, __entry->expires, __entry->cpu)
> +);
How do we connect the trace to the jiffies value when the timer
was started ?
> +
> +TRACE_EVENT(timer_expire,
> +
> + TP_PROTO(struct timer_list *timer),
> +
> + TP_ARGS(timer),
> +
> + TP_STRUCT__entry(
> + __field( void *, timer )
> + __field( void *, function )
> + ),
> +
> + TP_fast_assign(
> + __entry->timer = timer;
> + __entry->function = timer->function;
> + ),
> +
> + TP_printk("timer=%p func=%pf", __entry->timer, __entry->function)
> +);
Ditto.
> +TRACE_EVENT(timer_cancel,
> +
> + TP_PROTO(struct timer_list *timer),
> +
> + TP_ARGS(timer),
> +
> + TP_STRUCT__entry(
> + __field( void *, timer )
> + __field( void *, function )
> + ),
> +
> + TP_fast_assign(
> + __entry->timer = timer;
> + __entry->function = timer->function;
> + ),
> +
> + TP_printk("timer=%p func=%pf", __entry->timer, __entry->function)
> +);
Same here.
> @@ -547,6 +550,7 @@ void init_timer_key(struct timer_list *timer,
> {
> debug_timer_init(timer);
> __init_timer(timer, name, key);
> + trace_timer_init(timer);
Can we please avoid to have two debug calls in one 2 line function ?
> }
> EXPORT_SYMBOL(init_timer_key);
>
> @@ -565,6 +569,7 @@ static inline void detach_timer(struct timer_list *timer,
> struct list_head *entry = &timer->entry;
>
> debug_timer_deactivate(timer);
> + trace_timer_cancel(timer);
Ditto. Please create one debug entity which covers both.
....
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists