132f6e5daSMasami Hiramatsu#!/bin/sh 232f6e5daSMasami Hiramatsu# SPDX-License-Identifier: GPL-2.0 3*e5992f37SHeiko Carstens# description: Kprobe profile 43591e90fSMasami Hiramatsu# requires: kprobe_events 532f6e5daSMasami Hiramatsu 632f6e5daSMasami Hiramatsu! grep -q 'myevent' kprobe_profile 7dc6bf4daSSteven Rostedt (VMware)echo "p:myevent $FUNCTION_FORK" > kprobe_events 832f6e5daSMasami Hiramatsugrep -q 'myevent[[:space:]]*0[[:space:]]*0$' kprobe_profile 932f6e5daSMasami Hiramatsuecho 1 > events/kprobes/myevent/enable 1032f6e5daSMasami Hiramatsu( echo "forked" ) 1132f6e5daSMasami Hiramatsugrep -q 'myevent[[:space:]]*[[:digit:]]*[[:space:]]*0$' kprobe_profile 1232f6e5daSMasami Hiramatsuecho 0 > events/kprobes/myevent/enable 1332f6e5daSMasami Hiramatsuecho > kprobe_events 1432f6e5daSMasami Hiramatsu! grep -q 'myevent' kprobe_profile 15