1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: Function return probe entry argument access 4 # requires: dynamic_events 'f[:[<group>/][<event>]] <func-name>':README 'kernel return probes support:':README 5 6 echo 'f:tests/myevent1 vfs_open arg=$arg1' >> dynamic_events 7 echo 'f:tests/myevent2 vfs_open%return arg=$arg1' >> dynamic_events 8 9 echo 1 > events/tests/enable 10 11 echo > trace 12 cat trace > /dev/null 13 14 streq() { 15 test $1 = $2 16 } 17 18 streq `grep -A 1 -m 1 myevent1 trace | sed -r 's/^.*(arg=.*)/\1/' `
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.