From: David Daney <ddaney@caviumnetworks.com>
To: Steven Rostedt <rostedt@goodmis.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 <compudj@krystal.dyndns.org>
Subject: Re: [RFC][PATCH 1/2] [PATCH 1/2] tracing: Add TRACE_EVENT_CONDITIONAL()
Date: Thu, 02 Dec 2010 14:58:48 -0800 [thread overview]
Message-ID: <4CF824A8.2070807@caviumnetworks.com> (raw)
In-Reply-To: <20101202224814.667536793@goodmis.org>
On 12/02/2010 02:36 PM, Steven Rostedt wrote:
> From: Steven Rostedt<srostedt@redhat.com>
>
> There are instances in the kernel that we only want to trace
> a tracepoint when a certain condition is set. But we do not
> want to test for that condition in the core kernel.
> If we test for that condition before calling the tracepoin, then
> we will be performing that test even when tracing is not enabled.
> This is 99.99% of the time.
>
> We currently can just filter out on that condition, but that happens
> after we write to the trace buffer. We just wasted time writing to
> the ring buffer for an event we never cared about.
>
> This patch adds:
>
> TRACE_EVENT_CONDITION() and DECLARE_TRACE_CLASS_CONDITION()
>
> These have a new TP_CONDITION() argument that comes right after
> the TP_ARGS(). This condition can use the parameters of the
> TRACE_EVENT() to determine if the tracepoint should be traced
> or not. The TP_CONDITION() will be placed in a if (cond) trace;
>
> For example, for the tracepoint sched_wakeup, it is useless to
> trace an wakeup event where the caller never actually work
> anything up (success = 0). So adding:
^^^
s/=/==/
As much as I hate to be a pedant, I would suggest changing this change
log for the sake of clarity.
David Daney
next prev parent reply other threads:[~2010-12-02 22:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 22:36 [RFC][PATCH 0/2] tracing: Add conditional to tracepoints Steven Rostedt
2010-12-02 22:36 ` [RFC][PATCH 1/2] [PATCH 1/2] tracing: Add TRACE_EVENT_CONDITIONAL() Steven Rostedt
2010-12-02 22:58 ` David Daney [this message]
2010-12-02 23:34 ` Steven Rostedt
2010-12-02 22:36 ` [RFC][PATCH 2/2] [PATCH 2/2] tracing: Only trace sched_wakeup if it actually work something up Steven Rostedt
2010-12-02 23:19 ` [RFC][PATCH 0/2] tracing: Add conditional to tracepoints Frederic Weisbecker
2010-12-03 1: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=4CF824A8.2070807@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--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=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.