[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c62985530812171423x71660399va172698b1e09b7ac@mail.gmail.com>
Date: Wed, 17 Dec 2008 23:23:42 +0100
From: "Frédéric Weisbecker" <fweisbec@...il.com>
To: "Steven Rostedt" <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>, "Ingo Molnar" <mingo@...e.hu>,
"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] ftrace: add not to regex on filtering functions
2008/12/17 Steven Rostedt <rostedt@...dmis.org>:
>
> The following patch is in:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
>
> branch: tip/devel
>
>
> Steven Rostedt (1):
> ftrace: add not to regex on filtering functions
>
> ----
> kernel/trace/ftrace.c | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
> ---------------------------
> commit 697732357fc9af46c5cbd865877495c9b52fb1e0
> Author: Steven Rostedt <srostedt@...hat.com>
> Date: Wed Dec 17 15:05:36 2008 -0500
>
> ftrace: add not to regex on filtering functions
>
> Impact: enhancement
>
> Ingo Molnar has asked about a way to remove items from the filter
> lists. Currently, you can only add or replace items. The way
> items are added to the list is through opening one of the list
> files (set_ftrace_filter or set_ftrace_notrace) via append.
> If the file is opened for truncate, the list is cleared.
>
> echo spin_lock > /debug/tracing/set_ftrace_filter
>
> The above will replace the list with only spin_lock
>
> echo spin_lock >> /debug/tracing/set_ftrace_filter
>
> The above will add spin_lock to the list.
>
> Now this patch adds:
>
> echo '!spin_lock' >> /debug/tracing/set_ftrace_filter
>
> This will remove spin_lock from the list.
>
> The limited glob features of these lists also can be notted.
>
> echo '!spin_*' >> /debug/tracing/set_ftrace_filter
>
> This will remove all functions that start with 'spin_'
>
> Note:
>
> echo '!spin_*' > /debug/tracing/set_ftrace_filter
>
> will simply clear out the list (notice the '>' instead of '>>')
>
Hi Steven,
That's a nice feature!
By reading this patch, I first thought that would be better to get rid
of set_ftrace_notrace and then use
the !func to trace all functions but the func. But this way we would
loose the feature of choosing some functions
and then remove only some of them by using the ! sign.
That's good as is.
--
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