2 # SPDX-License-Identifier: GPL-2.0
3 # description: ftrace - function profiling
5 [ ! -f function_profile_enabled ] && exit_unsupported
7 : "Enable function profile"
8 echo 1 > function_profile_enabled
10 : "Profile must be updated"
11 cp trace_stat/function0 $TMPDIR/
12 ( echo "forked"; sleep 1 )
13 : "diff returns 0 if there is no difference"
14 ! diff trace_stat/function0 $TMPDIR/function0
16 echo 0 > function_profile_enabled
18 : "Profile must NOT be updated"
19 cp trace_stat/function0 $TMPDIR/
20 ( echo "forked"; sleep 1 )
21 : "diff returns 0 if there is no difference"
22 diff trace_stat/function0 $TMPDIR/function0