1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: Generic dynamic event - add/remove tracepoint probe events 4 # requires: dynamic_events "t[:[<group>/][<event>]] <tracepoint> [<args>]":README 5 6 echo 0 > events/enable 7 echo > dynamic_events 8 9 TRACEPOINT1=kmem_cache_alloc 10 TRACEPOINT2=kmem_cache_free 11 12 echo "t:myevent1 $TRACEPOINT1" >> dynamic_events 13 echo "t:myevent2 $TRACEPOINT2" >> dynamic_events 14 15 grep -q myevent1 dynamic_events 16 grep -q myevent2 dynamic_events 17 test -d events/tracepoints/myevent1 18 test -d events/tracepoints/myevent2 19 20 echo "-:myevent2" >> dynamic_events 21 22 grep -q myevent1 dynamic_events 23 ! grep -q myevent2 dynamic_events 24 25 echo > dynamic_events 26 27 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.