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

From: Thomas Gleixner
Date: Mon Jul 06 2009 - 16:13:23 EST


On Mon, 6 Jul 2009, Xiao Guangrong wrote:
> +TRACE_EVENT(hrtimer_expire,
> +
> + TP_PROTO(struct hrtimer *timer, s64 now),
> +
> + TP_ARGS(timer, now),
> +
> + TP_STRUCT__entry(
> + __field( void *, timer )
> + __field( void *, function )

Again, function is not necessary here.

> + __field( s64, now )
> + ),
> +
> + TP_fast_assign(
> + __entry->timer = timer;
> + __entry->function = timer->function;
> + __entry->now = now;
> + ),
> +
> + TP_printk("timer=%p func=%pf now=%llu", __entry->timer, __entry->function,
> + (unsigned long long)__entry->now)
> +);
> +
> +TRACE_EVENT(hrtimer_cancel,
> +
> + TP_PROTO(struct hrtimer *timer),
> + TP_ARGS(timer),
> + TP_STRUCT__entry(
> + __field( void *, timer )
> + __field( void *, function )

Ditto.

> +static inline void debug_and_trace_hrtimer_expire(struct hrtimer *timer,
> + s64 now)

Technically not necessary.

>
> + debug_and_trace_hrtimer_expire(timer, basenow.tv64);
> __run_hrtimer(timer);

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

> }
> spin_unlock(&cpu_base->lock);
> @@ -1436,6 +1463,7 @@ void hrtimer_run_queues(void)
> hrtimer_get_expires_tv64(timer))
> break;
>
> + debug_and_trace_hrtimer_expire(timer, base->softirq_time.tv64);
> __run_hrtimer(timer);

Ditto.

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/