summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace/test.d/functions
blob: c37262f6c269fecf51c9d3ac664a39bb62700f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
clear_trace() { # reset trace output
    echo > trace
}

disable_tracing() { # stop trace recording
    echo 0 > tracing_on
}

enable_tracing() { # start trace recording
    echo 1 > tracing_on
}

reset_tracer() { # reset the current tracer
    echo nop > current_tracer
}

reset_trigger() { # reset all current setting triggers
    grep -v ^# events/*/*/trigger |
    while read line; do
        cmd=`echo $line | cut -f2- -d: | cut -f1 -d" "`
	echo "!$cmd" > `echo $line | cut -f1 -d:`
    done
}