Home | History | Annotate | Download | only in kprobe
      1 #!/bin/sh
      2 # SPDX-License-Identifier: GPL-2.0
      3 # description: Kprobe event with comm arguments
      4 
      5 [ -f kprobe_events ] || exit_unsupported # this is configurable
      6 
      7 grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
      8 
      9 echo 'p:testprobe _do_fork comm=$comm ' > kprobe_events
     10 grep testprobe kprobe_events | grep -q 'comm=$comm'
     11 test -d events/kprobes/testprobe
     12 
     13 echo 1 > events/kprobes/testprobe/enable
     14 ( echo "forked")
     15 grep testprobe trace | grep -q 'comm=".*"'
     16 
     17 exit 0
     18