From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Theodore Tso <tytso@mit.edu>,
Arjan van de Ven <arjan@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [RFC][PATCH 1/2 v2] tracing: Add TRACE_EVENT_CONDITIONAL()
Date: Fri, 03 Dec 2010 09:09:04 -0500 [thread overview]
Message-ID: <1291385344.3228.4.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20101203045402.GA29609@Krystal>
On Thu, 2010-12-02 at 23:54 -0500, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@goodmis.org) wrote:
> [...]
> > -#define __DO_TRACE(tp, proto, args) \
> > +#define __DO_TRACE(tp, proto, args, cond) \
> > do { \
> > struct tracepoint_func *it_func_ptr; \
> > void *it_func; \
> > void *__data; \
> > \
> > + if (!(cond)) \
>
> One small documentation-related detail: my guess is that you are leaving
> "cond" without likely/unlikely builtin expect purposefully so that we
> can write, in TP_CONDITION:
>
> TP_CONDITION(unlikely(someparam)),
I actually think this is an abuse of "unlikely".
>
> when we expect the condition to be usually false (and likely() for the
> reverse). Maybe it could be worth documenting that expressions like the
> following are valid :
>
> TP_CONDITION((likely(param1) && unlikely(param2)) || likely(param3))
>
> It's fair to assume that kernel developers know this already, but given
> we plan to re-use TRACE_EVENT() for the user-space tracer soon enough,
> documenting this kind of use-case now can save us the trouble in the
> future.
I would frown on someone using unlikely here. But a TRACE_EVENT()
belongs to the maintainer, not me.
>
> Other than that,
>
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thanks!
-- Steve
next prev parent reply other threads:[~2010-12-03 14:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 4:03 [RFC][PATCH 0/2 v2] tracing: Add conditional to tracepoints Steven Rostedt
2010-12-03 4:03 ` [RFC][PATCH 1/2 v2] tracing: Add TRACE_EVENT_CONDITIONAL() Steven Rostedt
2010-12-03 4:54 ` Mathieu Desnoyers
2010-12-03 14:09 ` Steven Rostedt [this message]
2010-12-03 15:27 ` Mathieu Desnoyers
2010-12-03 15:38 ` Steven Rostedt
2010-12-03 15:46 ` Mathieu Desnoyers
2010-12-03 4:04 ` [RFC][PATCH 2/2 v2] tracing: Only trace sched_wakeup if it actually work something up Steven Rostedt
2010-12-08 12:12 ` Peter Zijlstra
2010-12-08 14:06 ` Steven Rostedt
2010-12-08 14:16 ` Peter Zijlstra
2010-12-03 14:47 ` [RFC][PATCH 0/2 v2] tracing: Add conditional to tracepoints Frederic Weisbecker
2010-12-03 14:53 ` Steven Rostedt
2010-12-03 14:59 ` Frederic Weisbecker
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=1291385344.3228.4.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=compudj@krystal.dyndns.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/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
Powered by JetHome