1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: Generic dynamic event - selective clear (compatibility) 4 # requires: dynamic_events kprobe_events synthetic_events "place: [<module>:]<symbol>":README "place (kretprobe): [<module>:]<symbol>":README "s:[synthetic/]":README 5 6 echo 0 > events/enable 7 echo > dynamic_events 8 9 PLACE=$FUNCTION_FORK 10 11 setup_events() { 12 echo "p:myevent1 $PLACE" >> dynamic_events 13 echo "s:latency1 u64 lat; pid_t pid;" >> dynamic_events 14 echo "r:myevent2 $PLACE" >> dynamic_events 15 echo "s:latency2 u64 lat; pid_t pid;" >> dynamic_events 16 17 grep -q myevent1 dynamic_events 18 grep -q myevent2 dynamic_events 19 grep -q latency1 dynamic_events 20 grep -q latency2 dynamic_events 21 } 22 23 setup_events 24 echo > synthetic_events 25 26 grep -q myevent1 dynamic_events 27 grep -q myevent2 dynamic_events 28 ! grep -q latency1 dynamic_events 29 ! grep -q latency2 dynamic_events 30 31 echo > dynamic_events 32 33 setup_events 34 echo > kprobe_events 35 36 ! grep -q myevent1 dynamic_events 37 ! grep -q myevent2 dynamic_events 38 grep -q latency1 dynamic_events 39 grep -q latency2 dynamic_events 40 41 echo > dynamic_events
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.