Commit 5e466647 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan

selftest: ftrace: Fix to pick text symbols for kprobes

Fix to pick text symbols for multiple kprobe testcase.
kallsyms shows text symbols with " t " or " T " but
current testcase picks all symbols including "t",
so it picks data symbols if it includes 't' (e.g. "str").

This fixes it to find symbol lines with " t " or " T "
(including spaces).
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Reported-by: default avatarRussell King <linux@armlinux.org.uk>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent a4f0e38e
...@@ -12,8 +12,8 @@ case `uname -m` in ...@@ -12,8 +12,8 @@ case `uname -m` in
*) OFFS=0;; *) OFFS=0;;
esac esac
echo "Setup up to 256 kprobes" echo "Setup up kprobes on first 256 text symbols"
grep t /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \ grep -i " t " /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \
head -n 256 | while read i; do echo p ${i}+${OFFS} ; done > kprobe_events ||: head -n 256 | while read i; do echo p ${i}+${OFFS} ; done > kprobe_events ||:
echo 1 > events/kprobes/enable echo 1 > events/kprobes/enable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment