diff options
author | kalyanreddy <reddyx.gundarapu@intel.com> | 2017-01-05 12:08:27 +0530 |
---|---|---|
committer | Kalyan reddy Gundarapu <reddyx.gundarapu@intel.com> | 2017-02-08 14:35:31 +0000 |
commit | be208cb48be4f4db438ce27be15e1f6166c26910 (patch) | |
tree | 9e0927d58be2bc3482f2cc4ccfe5f2dc337b27d2 /ci/envs/disable_trace.sh | |
parent | 2046178d894438b492d93f30941076ee7964f6ab (diff) |
Enabling ftrace for kernel debugging.
This patch contains updated scripts to enable ftrace for kernel
debugging and storing the log files to artifact repository.
Change-Id: I81b8f987c2c214ca53a6e4502ad953a9adbc6be9
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
Diffstat (limited to 'ci/envs/disable_trace.sh')
-rwxr-xr-x | ci/envs/disable_trace.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ci/envs/disable_trace.sh b/ci/envs/disable_trace.sh new file mode 100755 index 000000000..1b04e62bb --- /dev/null +++ b/ci/envs/disable_trace.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -o xtrace +curpwd=`pwd` +TRACE_FILE=$1 +TRACEDIR=/sys/kernel/debug/tracing/ + +sudo bash -c "echo 0 >$TRACEDIR/tracing_on" +sleep 1 +sudo bash -c "cat $TRACEDIR/trace > $TRACE_FILE" +sudo bash -c "echo > $TRACEDIR/set_event" +sudo bash -c "echo > $TRACEDIR/trace" +sudo sysctl kernel.ftrace_enabled=0 +sudo bash -c "echo nop > $TRACEDIR/current_tracer" + +set +o xtrace +cd $curpwd |