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