提交 ee3988c7 编写于 作者: S Steven Rostedt (Red Hat) 提交者: Steven Rostedt

ftracetest: Add functions file that holds helper functions

Created the file tools/testing/ftrace/test.d/functions that will
hold helper functions.

Current helper functions include:

 Add clear_trace() helper to reset the trace file

   Used as a descriptive name to show that "echo > trace" is clearing
   the trace file.

 Add disable/enable_tracing() helper calls

   Add calls that disable and enable tracing respectively by echoing
   0 or 1 into tracing_on.

 Add helper reset_tracer() function

    Add a helper function reset_tracer() that will clear the current_tracer
    (echo nop > current_tracer).

Link: http://lkml.kernel.org/r/20141103212737.696365174@goodmis.org
Link: http://lkml.kernel.org/r/20141104153028.465517119@goodmis.orgAcked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: NNamhyung Kim <namhyung@kernel.org>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 52100d7f
...@@ -235,6 +235,9 @@ run_test() { # testfile ...@@ -235,6 +235,9 @@ run_test() { # testfile
fi fi
} }
# load in the helper functions
. $TEST_DIR/functions
# Main loop # Main loop
for t in $TEST_CASES; do for t in $TEST_CASES; do
run_test $t run_test $t
......
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
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册