From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Li Zefan <lizf@cn.fujitsu.com>, Jiri Olsa <jolsa@redhat.com>,
David Sharp <dhsharp@google.com>,
Vaibhav Nagarnaik <vnagarnaik@google.com>,
Michael Rubin <mrubin@google.com>
Subject: Re: [RFC][PATCH 00/13] ftrace: Allow multiple users to pick and choose functions to trace
Date: Tue, 10 May 2011 10:00:29 +0200 [thread overview]
Message-ID: <20110510080029.GA27426@elte.hu> (raw)
In-Reply-To: <20110506152624.776982312@goodmis.org>
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Ingo, et. al.
>
> This is an RFC patch set of the work I did to allow multiple users
> to pick and choose which functions they would like to trace without
> being affected by other users (well, they are still affected, but
> they can choose their own functions).
>
> Since this rewrote a lot of the guts of ftrace's function handling
> I broke it up into steps that I can sequentially think about how to
> make the conversion. It also helped in understanding the changes that
> had to be made.
>
> The end result now has this:
>
> o The function record list flags item now stores a ref count, and
> we no longer need to have the flags if the records are filtered
> or set for "notrace"
>
> o Each ftrace_ops has its own set of functions to trace or not trace
> which is used to update the ref counts of the function records
> mentioned above. If the ftrace_ops is not currently active, the
> records are not touched when the filters are changed. If the filters
> are changed while the ftrace_ops is active, it is done in a way
> with RCU to make the updates.
>
> o If only one ftrace_ops is registered for tracing (actively tracing),
> its handler is called directly from mcount. Unless the ftrace_ops
> was allocated and not a static/global core kernel variable (see below).
>
> o If more than one ftrace_ops is registered, then a function is called
> that will iterate over the list of registered ftrace_ops, performing
> a check of each of its hashes to know if ftrace_ops handler should
> be called for that function.
>
> o If a ftrace_ops is allocated and not a static/global core kernel
> variable, it will be forced to use the function that loops through
> the ftrace_ops even if its the only one. This is because that function
> disables preemption when it performs the loop. This is needed, because
> dynamically allocated ftrace_ops must call synchronize_sched() before
> being freed (which is done when the dynamic ftrace_ops has been
> unregistered).
>
> o A file has been created in the debugfs/tracing directory called
> enabled_functions. This file contains a list of all functions that
> any ftrace_ops has registered, along with each functions ref count.
> This can be used to make sure nothing is tracing.
Well, i think we'd like to see the end result as well: i.e. function tracing
exposed to a tracer that can do per task tracing (perf) and then demonstrating
that independent tracing sessions can trace functions without impacting each
other.
Thanks,
Ingo
next prev parent reply other threads:[~2011-05-10 8:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 15:26 [RFC][PATCH 00/13] ftrace: Allow multiple users to pick and choose functions to trace Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 01/13] ftrace: Replace FTRACE_FL_NOTRACE flag with a hash of ignored functions Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 02/13] ftrace: Use hash instead for FTRACE_FL_FILTER Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 03/13] ftrace: Create a global_ops to hold the filter and notrace hashes Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 04/13] ftrace: Separate hash allocation and assignment Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 05/13] ftrace: Use counters to enable functions to trace Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 06/13] ftrace: Add enabled_functions file Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 07/13] ftrace: Add ops parameter to ftrace_startup/shutdown functions Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 08/13] ftrace: Have global_ops store the functions that are to be traced Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 09/13] ftrace: Free hash with call_rcu_sched() Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 10/13] ftrace: Implement separate user function filtering Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 11/13] ftrace: Allow dynamically allocated function tracers Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 12/13] ftrace: Modify ftrace_set_filter/notrace to take ops Steven Rostedt
2011-05-06 15:26 ` [RFC][PATCH 13/13] ftrace: Add self-tests for multiple function trace users Steven Rostedt
2011-05-10 8:00 ` Ingo Molnar [this message]
2011-05-10 8:32 ` [RFC][PATCH 00/13] ftrace: Allow multiple users to pick and choose functions to trace Steven Rostedt
2011-05-10 14:29 ` 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=20110510080029.GA27426@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=dhsharp@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mrubin@google.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vnagarnaik@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox