Re: [PATCH 5/6] trace: Add tracepoints to call function interrupthandlers

From: Frederic Weisbecker
Date: Thu Jul 14 2011 - 18:05:54 EST


On Thu, Jul 14, 2011 at 02:38:14PM -0700, Vaibhav Nagarnaik wrote:
> Add tracepoints to call function and call function single interrupt
> handlers.
>
> This is a part of overall effort to trace all the interrupts happening
> in a system to figure out what time is spent in kernel space versus user
> space.
>
> Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@xxxxxxxxxx>
> ---
> include/trace/events/irq.h | 73 ++++++++++++++++++++++++++++++++++++++++++++
> kernel/smp.c | 5 +++
> 2 files changed, 78 insertions(+), 0 deletions(-)
>
> diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
> index a2a0a49..40b19f4 100644
> --- a/include/trace/events/irq.h
> +++ b/include/trace/events/irq.h
> @@ -384,6 +384,79 @@ DEFINE_EVENT(reschedule_interrupt, reschedule_interrupt_exit,
> TP_ARGS(ignore)
> );
>
> +DECLARE_EVENT_CLASS(call_function,
> +
> + TP_PROTO(unsigned int ignore),
> +
> + TP_ARGS(ignore),
> +
> + TP_STRUCT__entry(
> + __field( unsigned int, ignore )
> + ),
> +
> + TP_fast_assign(
> + __entry->ignore = ignore;
> + ),
> +
> + TP_printk("%u", __entry->ignore)
> +);
> +
> +/**
> + * call_function_entry - called immediately after entering the
> + * call function interrupt handler
> + *
> + * When used in combination with the call_function_exit tracepoint
> + * we can determine the call function interrupt handler runtime.
> + */
> +DEFINE_EVENT(call_function, call_function_entry,
> +
> + TP_PROTO(unsigned int ignore),
> +
> + TP_ARGS(ignore)
> +);

Looks good. But perhaps we need some disambiguation on the names, call_function is perhaps
too generic.

What about trace_irq_call_function() ? Or may be something with ipi in the name, dunno.
--
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/