Re: [PATCH 2/3] ftrace: add tracepoint for hrtimer

From: Xiao Guangrong
Date: Wed May 27 2009 - 03:44:00 EST




Thomas Gleixner wrote:
> On Fri, 22 May 2009, Xiao Guangrong wrote:
>> +TRACE_EVENT(hrtimer_start,
>> +
>> + TP_PROTO(struct hrtimer *timer),
>> +
>> + TP_ARGS(timer),
>> +
>> + TP_STRUCT__entry(
>> + __field( void *, timer )
>> + __field( void *, function )
>> + __field( s64, expires )
>> + __field( s64, softexpires )
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->timer = timer;
>> + __entry->function = timer->function;
>> + __entry->expires = ktime_to_ns(hrtimer_get_expires(timer));
>> + __entry->softexpires = ktime_to_ns(hrtimer_get_softexpires(timer));
>> + ),
>
> Yuck, we really do not want expensive conversions in the fast
> path. This can be done by printk or user space tools.
>

Yes, you are right. I'will correct it.

>> @@ -1119,6 +1122,7 @@ void hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
>> {
>> debug_hrtimer_init(timer);
>> __hrtimer_init(timer, clock_id, mode);
>> + trace_hrtimer_init(timer, clock_id, mode);
>
> The comments I made about the timer.c tracepoints vs. debugobjects
> apply here as well.
>
> 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/