[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090220104004.GC28581@elte.hu>
Date: Fri, 20 Feb 2009 11:40:04 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing/function-graph-tracer: make set_graph_function
file support ftrace regex
* Frederic Weisbecker <fweisbec@...il.com> wrote:
> Impact: trace only functions matching a pattern
>
> The set_graph_function file let one to trace only one or several
> chosen functions and follow all their code flow.
>
> Currently, only a constant function name is allowed so this patch
> allows the ftrace_regex functions:
>
> _ matches all functions that end with "name":
> echo *name > set_graph_function
>
> _ matches all functions that begin with "name":
> echo name* > set_graph_function
>
> _ matches all functions that contains "name":
> echo *name* > set_graph_function
>
> Example:
>
> echo mutex* > set_graph_function
>
> 0) | mutex_lock_nested() {
> 0) 0.563 us | __might_sleep();
> 0) 2.072 us | }
> 0) | mutex_unlock() {
> 0) 1.036 us | __mutex_unlock_slowpath();
> 0) 2.433 us | }
> 0) | mutex_unlock() {
> 0) 0.691 us | __mutex_unlock_slowpath();
> 0) 1.787 us | }
> 0) | mutex_lock_interruptible_nested() {
> 0) 0.548 us | __might_sleep();
> 0) 1.945 us | }
>
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> ---
> kernel/trace/ftrace.c | 56 +++++++++++++++++++++++++++++++++---------------
> 1 files changed, 38 insertions(+), 18 deletions(-)
Applied, thanks Frederic!
I'm wondering about the following: the whole set_graph_function
method is limited (to FTRACE_GRAPH_MAX_FUNCS, 32 entries), is
not scalable (we walk the array of functions at every function
trace point), has a separate API, etc.
Wouldnt we off better with a good, generic function attributes
hash, and an extension to the generic regexp parser to enable
the setting of those attributes? One such attribute could be the
'expand child function'
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists