From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
Masami Hiramatsu <mhiramat@kernel.org>,
Dmitry Safonov <0x7f454c46@gmail.com>,
Shuah Khan <shuah@kernel.org>
Subject: [PATCH 3/6] selftests/ftrace: Have reset_ftrace_filter handle modules
Date: Fri, 09 Feb 2018 15:03:07 -0500 [thread overview]
Message-ID: <20180209200359.492417940@goodmis.org> (raw)
In-Reply-To: 20180209200304.703130163@goodmis.org
[-- Attachment #1: 0003-selftests-ftrace-Have-reset_ftrace_filter-handle-mod.patch --]
[-- Type: text/plain, Size: 1463 bytes --]
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
If a function probe in set_ftrace_filter belongs to a module, it will
contain the module name. Like:
wmi_query_block [wmi]:traceoff:unlimited
But writing:
'!wmi_query_block [wmi]:traceoff' > set_ftrace_filter
will cause an error. We still need to write:
'!wmi_query_block:traceoff' > set_ftrace_filter
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
tools/testing/selftests/ftrace/test.d/functions | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index f2019b37370d..e7c4c7b752a2 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -37,17 +37,18 @@ reset_ftrace_filter() { # reset all triggers in set_ftrace_filter
if [ "$tr" = "" ]; then
continue
fi
+ name=`echo $t | cut -d: -f1 | cut -d' ' -f1`
if [ $tr = "enable_event" -o $tr = "disable_event" ]; then
- tr=`echo $t | cut -d: -f1-4`
+ tr=`echo $t | cut -d: -f2-4`
limit=`echo $t | cut -d: -f5`
else
- tr=`echo $t | cut -d: -f1-2`
+ tr=`echo $t | cut -d: -f2`
limit=`echo $t | cut -d: -f3`
fi
if [ "$limit" != "unlimited" ]; then
tr="$tr:$limit"
fi
- echo "!$tr" > set_ftrace_filter
+ echo "!$name:$tr" > set_ftrace_filter
done
}
--
2.15.1
next prev parent reply other threads:[~2018-02-09 20:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 20:03 [PATCH 0/6] [GIT PULL] tracing: Some fixes to filter parsing Steven Rostedt
2018-02-09 20:03 ` [PATCH 1/6] ftrace: Remove incorrect setting of glob search field Steven Rostedt
2018-02-09 20:03 ` [PATCH 2/6] tracing: Fix parsing of globs with a wildcard at the beginning Steven Rostedt
2018-02-09 20:03 ` Steven Rostedt [this message]
2018-02-09 20:03 ` [PATCH 4/6] selftests/ftrace: Have reset_ftrace_filter handle multiple instances Steven Rostedt
2018-02-09 20:03 ` [PATCH 5/6] selftests/ftrace: Add some missing glob checks Steven Rostedt
2018-02-09 20:03 ` [PATCH 6/6] selftests/ftrace: Add more tests for removing of function probes Steven Rostedt
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=20180209200359.492417940@goodmis.org \
--to=rostedt@goodmis.org \
--cc=0x7f454c46@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=shuah@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).