Re: [PATCH tip 1/1] tracing: handle unregistering the currenttracer

From: Ingo Molnar
Date: Mon Feb 09 2009 - 06:58:54 EST



* Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:

> Em Mon, Feb 09, 2009 at 10:58:16AM +0100, Ingo Molnar escreveu:
> >
> > * Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> >
> > > Impact: simplification
> > >
> > > Instead of requiring that plugins have the sequence:
> > >
> > > my_tracer_stop(my_trace_array);
> > > unregister_tracer(my_tracer);
> > >
> > > it should be possible just do a:
> > >
> > > unregister_tracer(my_tracer);
> > >
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> > > ---
> > > kernel/trace/trace.c | 9 +++++++++
> > > 1 files changed, 9 insertions(+), 0 deletions(-)
> >
> > Applied to tip/tracing/ftrace, thanks Arnaldo!
> >
> > Nice one - we should try to shoot for the smallest physically
> > possible linecount for any new (possibly trivial) tracer plugin.
>
> That and also for as few as possible EXPORT_SYMBOL_GPL entries, now, for
> converting net/ipv4/tcp_probe.c to an ftrace plugin + one tracepoint at
> tcp_rcv_established we need:
>
> doppio linux-2.6-tip]$ grep ^+EXPORT_SYMBOL ~/tcp_cwnd_tracer.patch
> +EXPORT_SYMBOL_GPL(register_tracer);
> +EXPORT_SYMBOL_GPL(unregister_tracer);
> +EXPORT_SYMBOL_GPL(tracing_record_cmdline);
> +EXPORT_SYMBOL_GPL(trace_buffer_lock_reserve);
> +EXPORT_SYMBOL_GPL(trace_buffer_unlock_commit);
> +EXPORT_SYMBOL_GPL(trace_seq_printf);
> +EXPORT_SYMBOL_GPL(register_ftrace_event);
> +EXPORT_SYMBOL_GPL(unregister_ftrace_event);
> [acme@doppio linux-2.6-tip]$

ok. For in-kernel plugins it's of course fine to do those exports in any case.

Ingo
--
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/