Re: [for-next][PATCH 08/20] tracing: Warn if a tracepoint is not set via debugfs

From: Mathieu Desnoyers
Date: Thu Mar 13 2014 - 11:24:54 EST


----- Original Message -----
> From: "Mathieu Desnoyers" <mathieu.desnoyers@xxxxxxxxxxxx>
> To: "Steven Rostedt" <rostedt@xxxxxxxxxxx>
> Cc: "Frank Ch. Eigler" <fche@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, "Ingo Molnar" <mingo@xxxxxxxxxx>, "Frederic
> Weisbecker" <fweisbec@xxxxxxxxx>, "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>, "Johannes Berg"
> <johannes.berg@xxxxxxxxx>, "Linus Torvalds" <torvalds@xxxxxxxxxxxxxxxxxxxx>, "Peter Zijlstra"
> <peterz@xxxxxxxxxxxxx>, "Thomas Gleixner" <tglx@xxxxxxxxxxxxx>, "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>,
> "lttng-dev" <lttng-dev@xxxxxxxxxxxxxxx>, "Rusty Russell" <rusty@xxxxxxxxxxxxxxx>, "Andi Kleen" <andi@xxxxxxxxxxxxxx>
> Sent: Wednesday, March 12, 2014 11:10:53 PM
> Subject: Re: [for-next][PATCH 08/20] tracing: Warn if a tracepoint is not set via debugfs
>
> ----- Original Message -----
> > From: "Steven Rostedt" <rostedt@xxxxxxxxxxx>
> > To: "Mathieu Desnoyers" <mathieu.desnoyers@xxxxxxxxxxxx>
> > Cc: "Frank Ch. Eigler" <fche@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
> > "Ingo Molnar" <mingo@xxxxxxxxxx>, "Frederic
> > Weisbecker" <fweisbec@xxxxxxxxx>, "Andrew Morton"
> > <akpm@xxxxxxxxxxxxxxxxxxxx>, "Johannes Berg"
> > <johannes.berg@xxxxxxxxx>, "Linus Torvalds"
> > <torvalds@xxxxxxxxxxxxxxxxxxxx>, "Peter Zijlstra"
> > <peterz@xxxxxxxxxxxxx>, "Thomas Gleixner" <tglx@xxxxxxxxxxxxx>, "Greg
> > Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>,
> > "lttng-dev" <lttng-dev@xxxxxxxxxxxxxxx>, "Rusty Russell"
> > <rusty@xxxxxxxxxxxxxxx>, "Andi Kleen" <andi@xxxxxxxxxxxxxx>
> > Sent: Wednesday, March 12, 2014 8:49:07 PM
> > Subject: Re: [for-next][PATCH 08/20] tracing: Warn if a tracepoint is not
> > set via debugfs
> >
> > On Wed, 12 Mar 2014 19:51:01 +0000 (UTC)
> > Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> >
> > > This only leaves tracepoints in header files and the impact of LTO as
> > > requirements for having tracepoint callsites with the same name across
> > > modules.
> >
> > The only thing that needs to be unique is the struct tracepoint
> > __tracepoint_##name. There should not be any duplicates of those. I
> > can't see how the LTO would duplicate a data structure without screwing
> > everything (not just tracepoints) up.
> >
> > We can still have more than one trace_##name() called, as that is
> > handled by the static key.
>
> Hrm, I seem to have mixed up the concerns regarding compiler
> optimisations between the static keys with those related to tracepoints
> (including that their predecessors "kernel markers" worked more like
> static keys than tracepoint). I did work in both area pretty much at the
> same time back in 2007-2008.
>
> Having gotten my head back up straight, I now see the point in your
> proposal. Thanks for bearing with me.
>
> Even if we ever want to have tracepoints within header files, as long
> as we have the DECLARE_TRACE() within the header, and a DEFINE_TRACE()
> in one location in the loaded kernel image (or a loaded module we depend
> on), it should be possible too. All tracepoint.c cares about is the site
> defined by DEFINE_TRACE().

I just prepared a patch implementing your idea. I will post it as RFC very
soon. The callers will still need to be adapted, so this is just to show
the tracepoint.c/h modifications.

Thanks!

Mathieu

>
> >
> > Note, I'm scrambling to get ready for my trip tomorrow. Thus, I'm not
> > as much at the computer. I may work on some patches in my 6 hour
> > layover though.
>
> Allright. Have a good trip!
>
> Thanks,
>
> Mathieu
>
> >
> > -- Steve
> >
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
>

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
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/