mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
selftest: ftrace: Fix to pick text symbols for kprobes
[ Upstream commit 5e46664703 ]
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: Masami Hiramatsu <mhiramat@kernel.org>
Reported-by: Russell King <linux@armlinux.org.uk>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
342d9092a5
commit
c45ab4fb38
@@ -12,8 +12,8 @@ case `uname -m` in
|
||||
*) OFFS=0;;
|
||||
esac
|
||||
|
||||
echo "Setup up to 256 kprobes"
|
||||
grep t /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \
|
||||
echo "Setup up kprobes on first 256 text symbols"
|
||||
grep -i " t " /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \
|
||||
head -n 256 | while read i; do echo p ${i}+${OFFS} ; done > kprobe_events ||:
|
||||
|
||||
echo 1 > events/kprobes/enable
|
||||
|
||||
Reference in New Issue
Block a user