mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Javi Merino <javi.merino@arm.com>,
	David Howells <dhowells@redhat.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [RFA][PATCH] tracing: Add trace_<tracepoint>_enabled() function
Date: Tue, 6 May 2014 17:06:40 -0400	[thread overview]
Message-ID: <20140506170640.088df53b@gandalf.local.home> (raw)
In-Reply-To: <799562553.12242.1399409621298.JavaMail.zimbra@efficios.com>

On Tue, 6 May 2014 20:53:41 +0000 (UTC)
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:


> > I do plan on adding more documentation to this to stress that this
> > should be done like this. But hey, we're kernel developers, we should
> > be responsible enough to not require the hand holding.
> 
> I like your optimism. ;-)

I'm always the optimist :-)

> > 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.

Still, having "side-effects" in the tracepoint parameters just seems
odd to me.

- Steve

  reply	other threads:[~2014-05-06 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 13:44 Steven Rostedt
2014-05-06 19:35 ` Mathieu Desnoyers
2014-05-06 19:48   ` Steven Rostedt
2014-05-06 20:53     ` Mathieu Desnoyers
2014-05-06 21:06       ` Steven Rostedt [this message]
2014-05-06 21:16         ` Mathieu Desnoyers
2014-05-07  3:10           ` [RFA][PATCH v2] " Steven Rostedt
2014-05-07 11:42             ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140506170640.088df53b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=javi.merino@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®