mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
selftests/ftrace: Have reset_ftrace_filter handle modules
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>
This commit is contained in:
parent
0723402141
commit
df9d36d9e8
1 changed files with 4 additions and 3 deletions
|
@ -37,17 +37,18 @@ reset_ftrace_filter() { # reset all triggers in set_ftrace_filter
|
||||||
if [ "$tr" = "" ]; then
|
if [ "$tr" = "" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
name=`echo $t | cut -d: -f1 | cut -d' ' -f1`
|
||||||
if [ $tr = "enable_event" -o $tr = "disable_event" ]; then
|
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`
|
limit=`echo $t | cut -d: -f5`
|
||||||
else
|
else
|
||||||
tr=`echo $t | cut -d: -f1-2`
|
tr=`echo $t | cut -d: -f2`
|
||||||
limit=`echo $t | cut -d: -f3`
|
limit=`echo $t | cut -d: -f3`
|
||||||
fi
|
fi
|
||||||
if [ "$limit" != "unlimited" ]; then
|
if [ "$limit" != "unlimited" ]; then
|
||||||
tr="$tr:$limit"
|
tr="$tr:$limit"
|
||||||
fi
|
fi
|
||||||
echo "!$tr" > set_ftrace_filter
|
echo "!$name:$tr" > set_ftrace_filter
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue