cfa0963dc4
This adds simple event trigger testcases for ftracetest, which covers following triggers. - traceon-traceoff trigger - enable/disable_event trigger - snapshot trigger - stacktrace trigger - trigger filters Here is the test result. ---- # ./ftracetest test.d/trigger/ === Ftrace unit tests === [1] event trigger - test event enable/disable trigger [PASS] [2] event trigger - test trigger filter [PASS] [3] event trigger - test snapshot-trigger [PASS] [4] event trigger - test stacktrace-trigger [PASS] [5] event trigger - test traceon/off trigger [PASS] # of passed: 5 # of failed: 0 # of unresolved: 0 # of untested: 0 # of unsupported: 0 # of xfailed: 0 # of undefined(test bug): 0 ---- Link: http://lkml.kernel.org/r/12b9c2b289a0dc1e4386e7b77674611a83abca85.1457029949.git.tom.zanussi@linux.intel.com Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Tom Zanussi <tom.zanussi@linux.intel.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
26 lines
501 B
Plaintext
26 lines
501 B
Plaintext
|
|
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
|
|
}
|
|
|