[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1813175652.12255.1399411000693.JavaMail.zimbra@efficios.com>
Date: Tue, 6 May 2014 21:16:40 +0000 (UTC)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Javi Merino <javi.merino@....com>,
David Howells <dhowells@...hat.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [RFA][PATCH] tracing: Add trace_<tracepoint>_enabled() function
----- Original Message -----
> From: "Steven Rostedt" <rostedt@...dmis.org>
> To: "Mathieu Desnoyers" <mathieu.desnoyers@...icios.com>
> Cc: "LKML" <linux-kernel@...r.kernel.org>, "Andrew Morton" <akpm@...ux-foundation.org>, "Javi Merino"
> <javi.merino@....com>, "David Howells" <dhowells@...hat.com>, "Ingo Molnar" <mingo@...nel.org>
> Sent: Tuesday, May 6, 2014 5:06:40 PM
> Subject: Re: [RFA][PATCH] tracing: Add trace_<tracepoint>_enabled() function
>
> On Tue, 6 May 2014 20:53:41 +0000 (UTC)
> Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:
>
[...]
>
> > > The first time I thought about using this was with David's code, which
> > > does this:
> > >
> > > if (static_key_false(&i2c_trace_msg)) {
> > > int i;
> > > for (i = 0; i < ret; i++)
> > > if (msgs[i].flags & I2C_M_RD)
> > > trace_i2c_reply(adap, &msgs[i], i);
> > > trace_i2c_result(adap, i, ret);
> > > }
> > >
> > > That would look rather silly in a tracepoint.
> >
> > Which goes with a mandatory silly question: how do you intend mapping
> > the single key to two different tracepoints ?
>
> Could always do:
>
> if (trace_i2c_result_enabled() || trace_i2c_reply_enabled()) {
>
> I wounder what the assembly of that would look like.
I would expect it to generate two static jump sites back to back.
>
> Still, having "side-effects" in the tracepoint parameters just seems
> odd to me.
I agree that the "enabled" static inline approach is more flexible. So
if we document it well enough, it might be OK in the end.
Thanks,
Mathieu
--
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists