2 # SPDX-License-Identifier: GPL-2.0
3 # description: Generic dynamic event - add/remove kprobe events
5 [ -f dynamic_events
] || exit_unsupported
7 grep -q "place: \[<module>:\]<symbol>" README || exit_unsupported
8 grep -q "place (kretprobe): \[<module>:\]<symbol>" README || exit_unsupported
10 echo 0 > events
/enable
15 echo "p:myevent1 $PLACE" >> dynamic_events
16 echo "r:myevent2 $PLACE" >> dynamic_events
18 grep -q myevent1 dynamic_events
19 grep -q myevent2 dynamic_events
20 test -d events
/kprobes
/myevent1
21 test -d events
/kprobes
/myevent2
23 echo "-:myevent2" >> dynamic_events
25 grep -q myevent1 dynamic_events
26 ! grep -q myevent2 dynamic_events