From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 4/4] tracing/filters: use ring_buffer_discard_commit for discarded events
Date: Fri, 3 Apr 2009 13:51:00 +0200 [thread overview]
Message-ID: <20090403115100.GH31399@elte.hu> (raw)
In-Reply-To: <alpine.DEB.2.00.0904021033080.965@gandalf.stny.rr.com>
* Steven Rostedt <rostedt@goodmis.org> wrote:
> > [ 240.462396] [<ffffffff802c843b>] trace_function+0xab/0xc0
>
> Oo, you have trace filters in trace_function. I'm not sure we want
> that. If we do, please make it a separate function register. That
> is, the function tracer is such a extreme hot path, that I would
> like to avoid as many branch conditionals as possible. With the
> dynamic function tracing, we can pick functions that do conditions
> when we want them, and we can pick those that do not. If you look
> at some of the register_ftrace_function callers, you will see
> where I've picked different functions to be called by the tracer
> depending on what the options are.
Actually, i like Tom's idea very much: as it allows pretty flexible
context based filtering - not just function based filtering.
So we could filter for:
- a specific PID
- or a pattern of ->comm strings ['bash' or 'sshd' or 'hackbench']
- or we could filter for non-zero preempt-counts
(i.e. critical sections only).
So this extends the function symbol based regexp mechanism in a
quite natural way, and it would be sad to not do this just because
it's ... arguably hard to implement robustly ;-)
The filter expression predicaments are pre-constructed and static at
the point of execution, so they rely on no external facility other
than some internal C code. So it should be possible to do this.
And if the tracepoint causes runtime overhead .. we need to optimize
that. We could register a different, filter-aware mcount callback
depending on whether there's any filter defined there.
Ingo
next prev parent reply other threads:[~2009-04-03 11:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 5:27 [PATCH 0/4] [GIT PULL] for tip/tracing/filters Steven Rostedt
2009-04-02 5:27 ` [PATCH 1/4] tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events Steven Rostedt
2009-04-02 12:17 ` Frederic Weisbecker
2009-04-02 5:27 ` Steven Rostedt
2009-04-02 5:27 ` [PATCH 2/4] tracing/filters: add TRACE_EVENT_FORMAT_NOFILTER event macro Steven Rostedt
2009-04-02 5:27 ` [PATCH 3/4] ring-buffer: add ring_buffer_discard_commit Steven Rostedt
2009-04-02 5:48 ` Andrew Morton
2009-04-02 13:08 ` Steven Rostedt
2009-04-02 5:27 ` [PATCH 4/4] tracing/filters: use ring_buffer_discard_commit for discarded events Steven Rostedt
2009-04-02 9:06 ` Tom Zanussi
2009-04-02 15:01 ` Steven Rostedt
2009-04-03 11:51 ` Ingo Molnar [this message]
2009-04-04 1:11 ` Steven Rostedt
2009-04-07 5:46 ` Tom Zanussi
2009-04-07 9:24 ` Steven Rostedt
2009-04-02 5:37 ` [PATCH 0/4] [GIT PULL] for tip/tracing/filters Steven Rostedt
2009-04-03 12:14 ` Ingo Molnar
2009-04-03 14:36 ` Steven Rostedt
2009-04-04 6:50 ` Tom Zanussi
2009-04-04 15:42 ` Steven Rostedt
2009-04-05 7:52 ` Tom Zanussi
2009-04-05 14:47 ` Ingo Molnar
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=20090403115100.GH31399@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
--cc=tzanussi@gmail.com \
/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.