From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: walimis <walimisdev@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ftrace: improve document
Date: Fri, 28 Nov 2008 13:16:37 +0100 [thread overview]
Message-ID: <20081128121637.GG18333@elte.hu> (raw)
In-Reply-To: <alpine.DEB.1.10.0811280155140.7113@gandalf.stny.rr.com>
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Fri, 28 Nov 2008, walimis wrote:
> >
> > Signed-off-by: walimis <walimisdev@gmail.com>
> > Reviewed-by: Ingo Molnar <mingo@elte.hu>
> > Reviewed-by: Steven Rostedt <srostedt@redhat.com>
>
> Acked-by: Steven Rostedt <srostedt@redhat.com>
applied it to tip/tracing/ftrace, thanks guys! (Changed the commit log a
bit, see the final commit below.)
Ingo
-------------->
>From c072c24975ec4f0ccfcb6f5c8a8040b6eb75ef8f Mon Sep 17 00:00:00 2001
From: walimis <walimisdev@gmail.com>
Date: Fri, 28 Nov 2008 12:21:19 +0800
Subject: [PATCH] ftrace: improve documentation
Impact: extend documentation with notice of using wild cards correctly
We know that we can use wild cards to set set_ftrace_filter, but there's
problem when using them naively 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 filenames to set_ftrace_filter, not the
intended "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 escape 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.
Signed-off-by: walimis <walimisdev@gmail.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
Documentation/ftrace.txt | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt
index de05042..803b131 100644
--- a/Documentation/ftrace.txt
+++ b/Documentation/ftrace.txt
@@ -1251,7 +1251,11 @@ These are the only wild cards which are supported.
<match>*<match> will not work.
- # echo hrtimer_* > /debug/tracing/set_ftrace_filter
+Note: It is better to use quotes to enclose the wild cards, otherwise
+ the shell may expand the parameters into names of files in the local
+ directory.
+
+ # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter
Produces:
@@ -1306,7 +1310,7 @@ Again, now we want to append.
# echo sys_nanosleep > /debug/tracing/set_ftrace_filter
# cat /debug/tracing/set_ftrace_filter
sys_nanosleep
- # echo hrtimer_* >> /debug/tracing/set_ftrace_filter
+ # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter
# cat /debug/tracing/set_ftrace_filter
hrtimer_run_queues
hrtimer_run_pending
prev parent reply other threads:[~2008-11-28 12:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 15:21 about use wild cards for set_ftrace_filter and so on walimis
2008-11-27 15:34 ` Steven Rostedt
2008-11-27 15:50 ` walimis
2008-11-27 15:58 ` Frédéric Weisbecker
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 [this message]
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=20081128121637.GG18333@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--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