2 # SPDX-License-Identifier: GPL-2.0
3 # description: Generic dynamic event - selective clear (compatibility)
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 grep -q "s:\[synthetic/\]" README || exit_unsupported
12 [ -f synthetic_events
] || exit_unsupported
13 [ -f kprobe_events
] || exit_unsupported
15 echo 0 > events
/enable
21 echo "p:myevent1 $PLACE" >> dynamic_events
22 echo "s:latency1 u64 lat; pid_t pid;" >> dynamic_events
23 echo "r:myevent2 $PLACE" >> dynamic_events
24 echo "s:latency2 u64 lat; pid_t pid;" >> dynamic_events
26 grep -q myevent1 dynamic_events
27 grep -q myevent2 dynamic_events
28 grep -q latency1 dynamic_events
29 grep -q latency2 dynamic_events
33 echo > synthetic_events
35 grep -q myevent1 dynamic_events
36 grep -q myevent2 dynamic_events
37 ! grep -q latency1 dynamic_events
38 ! grep -q latency2 dynamic_events
45 ! grep -q myevent1 dynamic_events
46 ! grep -q myevent2 dynamic_events
47 grep -q latency1 dynamic_events
48 grep -q latency2 dynamic_events