1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: Generic dynamic event - add/remove kprobe events 4 # requires: dynamic_events "place: [<module>:]<symbol>":README "place (kretprobe): [<module>:]<symbol>":README 5 6 echo 0 > events/enable 7 echo > dynamic_events 8 9 PLACE=$FUNCTION_FORK 10 11 echo "p:myevent1 $PLACE" >> dynamic_events 12 echo "r:myevent2 $PLACE" >> dynamic_events 13 14 grep -q myevent1 dynamic_events 15 grep -q myevent2 dynamic_events 16 test -d events/kprobes/myevent1 17 test -d events/kprobes/myevent2 18 19 echo "-:myevent2" >> dynamic_events 20 21 grep -q myevent1 dynamic_events 22 ! grep -q myevent2 dynamic_events 23 24 echo > dynamic_events 25 26 if grep -q "p\[:\[<group>/]\[<event>]]" README; then 27 echo "p:mygroup/ $PLACE" >> dynamic_events 28 test -d events/mygroup 29 echo "-:mygroup/" >> dynamic_events 30 ! test -d events/mygroup 31 fi 32 33 clear_trace
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.