18c2ecf20Sopenharmony_ci#!/bin/sh 28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 38c2ecf20Sopenharmony_ci# description: Kprobe profile 48c2ecf20Sopenharmony_ci# requires: kprobe_events 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci! grep -q 'myevent' kprobe_profile 78c2ecf20Sopenharmony_ciecho "p:myevent $FUNCTION_FORK" > kprobe_events 88c2ecf20Sopenharmony_cigrep -q 'myevent[[:space:]]*0[[:space:]]*0$' kprobe_profile 98c2ecf20Sopenharmony_ciecho 1 > events/kprobes/myevent/enable 108c2ecf20Sopenharmony_ci( echo "forked" ) 118c2ecf20Sopenharmony_cigrep -q 'myevent[[:space:]]*[[:digit:]]*[[:space:]]*0$' kprobe_profile 128c2ecf20Sopenharmony_ciecho 0 > events/kprobes/myevent/enable 138c2ecf20Sopenharmony_ciecho > kprobe_events 148c2ecf20Sopenharmony_ci! grep -q 'myevent' kprobe_profile 15