Re: [PATCH 1/3] ftrace: add tracepoint for timer
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Wed, 27 May 2009 12:10:58 +0200 (CEST)
On Wed, 27 May 2009, Xiao Guangrong wrote:
+ 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 ?
ftrace already have time information in trace event's output, we can use it instead
Hmm, I'm not sure whether we can see the jiffies value there, but ok.
@@ -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 ?
debug_timer_init() must call before object's init, but tracepoint have to call
after object's init beacuse if we move the tracepoint to before object init, the
object has no data yet.
Err.
+ TRACE_EVENT(timer_init,
+
+ TP_PROTO(struct timer_list *timer),
+
+ TP_ARGS(timer),
+
+ TP_STRUCT__entry(
+ __field( void *, timer )
+ ),
+
+ TP_fast_assign(
+ __entry->timer = timer;
+ ),
+
+ TP_printk("timer=%p", __entry->timer)
+);
Is timer different before and after the __init_timer call ?
}
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.
IMHO, we can't create one entity for init event, so we do better detach other event.
See above.
Thanks,
tglx
--
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/
- Follow-Ups:
- Re: Re: [PATCH 1/3] ftrace: add tracepoint for timer
- From: Zhaolei
- Re: Re: [PATCH 1/3] ftrace: add tracepoint for timer
- References:
- [PATCH 1/3] ftrace: add tracepoint for timer
- From: Xiao Guangrong
- Re: [PATCH 1/3] ftrace: add tracepoint for timer
- From: Thomas Gleixner
- Re: [PATCH 1/3] ftrace: add tracepoint for timer
- From: Xiao Guangrong
- [PATCH 1/3] ftrace: add tracepoint for timer
- Prev by Date: Re: [PATCH] x86: MCE: Fix for mce_panic_timeout
- Next by Date: Re: [Xen-devel] Re: [GIT PULL] Xen APIC hooks (with io_apic_ops)
- Previous by thread: Re: [PATCH 1/3] ftrace: add tracepoint for timer
- Next by thread: Re: Re: [PATCH 1/3] ftrace: add tracepoint for timer
- Index(es):
Relevant Pages
|