From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: walimis <walimisdev@gmail.com>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@elte.hu>
Subject: Re: about use wild cards for set_ftrace_filter and so on
Date: Thu, 27 Nov 2008 16:58:06 +0100 [thread overview]
Message-ID: <c62985530811270758q214119e1gbd7699da55d68581@mail.gmail.com> (raw)
In-Reply-To: <20081127155047.GB24616@ubuntu.mshome.net>
2008/11/27 walimis <walimisdev@gmail.com>:
> On Thu, Nov 27, 2008 at 10:34:19AM -0500, Steven Rostedt wrote:
>>
>>On Thu, 27 Nov 2008, walimis wrote:
>>
>>>
>>> I encountered an issue when using ftrace.
>>> We know that we can use wild cards to set set_ftrace_filter, but there's
>>> problem when using such as "echo h* > /debug/tracing/set_ftrace_filter".
>>> If there are files named with "h" prefix in current directory, echo "h*"
>>> will echo these files' name to set_ftrace_filter, not "h*".
>>> For example:
>>>
>>> #cat /debug/tracing/available_filter_functions |grep ^hr |wc -l
>>> 23
>>> #ls
>>> #touch hraa hrdd
>>> #ls
>>> hraa hrdd
>>> #echo hr* > /debug/tracing/set_ftrace_filter
>>> #cat /debug/tracing/set_ftrace_filter
>>>
>>> No output in /debug/tracing/set_ftrace_filter!
>>> If we use "" to enclose wild cards, it works:
>>>
>>> #ls
>>> hraa hrdd
>>> #echo "hr*" > /debug/tracing/set_ftrace_filter
>>> #cat /debug/tracing/set_ftrace_filter |wc -l
>>> 23
>>>
>>> This problem can lead to unexpected result if current directory has a
>>> lot of files.
>>> I suppose that we can add some notes to document, so a patch attached.
>>
>>Using TB? It's best to inline the patch, that way I can comment on it
>>better.
> Using mutt, but I don't know how to inline the patch now.
>
>>
>>Anyway, you should fix the example. I also recommend a single quote over
>>double, to prevent any other translation that bash might do.
>>
>>The example in ftrace.txt should be:
>>
>> # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter
>>
>>
>>Thanks,
>>
>>-- Steve
>>
>>/me goes back to eating turkeys.
> I only add a note, but I wonder whether enough.
> If needed, I can add a example to this document.
>
> Impact: imporve document
>
> Signed-off-by: walimis <walimisdev@gmail.com>
> ---
> Documentation/ftrace.txt | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt
> index de05042..9735434 100644
> --- a/Documentation/ftrace.txt
> +++ b/Documentation/ftrace.txt
> @@ -1251,6 +1251,9 @@ These are the only wild cards which are supported.
>
> <match>*<match> will not work.
>
> +Note: you'd better to use '' to enclose wild cards, otherwise in some
> +case you can't get the correct result.
> +
> # echo hrtimer_* > /debug/tracing/set_ftrace_filter
>
> Produces:
> --
> 1.6.0.3
Cc'ed Ingo.
next prev parent reply other threads:[~2008-11-27 15:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 15:21 walimis
2008-11-27 15:34 ` Steven Rostedt
2008-11-27 15:50 ` walimis
2008-11-27 15:58 ` Frédéric Weisbecker [this message]
2008-11-27 16:21 ` Ingo Molnar
2008-11-28 2:32 ` [PATCH 1/1] ftrace: improve document walimis
2008-11-28 3:52 ` Steven Rostedt
2008-11-28 4:21 ` walimis
2008-11-28 6:55 ` Steven Rostedt
2008-11-28 12:16 ` 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=c62985530811270758q214119e1gbd7699da55d68581@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=walimisdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®