162306a36Sopenharmony_ci#!/bin/sh 262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 362306a36Sopenharmony_ci# description: Kprobe profile 462306a36Sopenharmony_ci# requires: kprobe_events 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci! grep -q 'myevent' kprobe_profile 762306a36Sopenharmony_ciecho "p:myevent $FUNCTION_FORK" > kprobe_events 862306a36Sopenharmony_cigrep -q 'myevent[[:space:]]*0[[:space:]]*0$' kprobe_profile 962306a36Sopenharmony_ciecho 1 > events/kprobes/myevent/enable 1062306a36Sopenharmony_ci( echo "forked" ) 1162306a36Sopenharmony_cigrep -q 'myevent[[:space:]]*[[:digit:]]*[[:space:]]*0$' kprobe_profile 1262306a36Sopenharmony_ciecho 0 > events/kprobes/myevent/enable 1362306a36Sopenharmony_ciecho > kprobe_events 1462306a36Sopenharmony_ci! grep -q 'myevent' kprobe_profile 15