diff options
author | walimis <walimisdev@gmail.com> | 2008-11-27 23:21:19 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-28 07:15:14 -0500 |
commit | c072c24975ec4f0ccfcb6f5c8a8040b6eb75ef8f (patch) | |
tree | 39d5e69fa5a7c98b71c103d7f4e0f7318215ddae /Documentation | |
parent | 50cdaf08a8ec1d7f43987705da7aff7cf949708f (diff) |
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ftrace.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt index de05042f11b9..803b1318b13d 100644 --- a/Documentation/ftrace.txt +++ b/Documentation/ftrace.txt | |||
@@ -1251,7 +1251,11 @@ These are the only wild cards which are supported. | |||
1251 | 1251 | ||
1252 | <match>*<match> will not work. | 1252 | <match>*<match> will not work. |
1253 | 1253 | ||
1254 | # echo hrtimer_* > /debug/tracing/set_ftrace_filter | 1254 | Note: It is better to use quotes to enclose the wild cards, otherwise |
1255 | the shell may expand the parameters into names of files in the local | ||
1256 | directory. | ||
1257 | |||
1258 | # echo 'hrtimer_*' > /debug/tracing/set_ftrace_filter | ||
1255 | 1259 | ||
1256 | Produces: | 1260 | Produces: |
1257 | 1261 | ||
@@ -1306,7 +1310,7 @@ Again, now we want to append. | |||
1306 | # echo sys_nanosleep > /debug/tracing/set_ftrace_filter | 1310 | # echo sys_nanosleep > /debug/tracing/set_ftrace_filter |
1307 | # cat /debug/tracing/set_ftrace_filter | 1311 | # cat /debug/tracing/set_ftrace_filter |
1308 | sys_nanosleep | 1312 | sys_nanosleep |
1309 | # echo hrtimer_* >> /debug/tracing/set_ftrace_filter | 1313 | # echo 'hrtimer_*' >> /debug/tracing/set_ftrace_filter |
1310 | # cat /debug/tracing/set_ftrace_filter | 1314 | # cat /debug/tracing/set_ftrace_filter |
1311 | hrtimer_run_queues | 1315 | hrtimer_run_queues |
1312 | hrtimer_run_pending | 1316 | hrtimer_run_pending |