summaryrefslogtreecommitdiffstats
path: root/ci/envs/disable_trace.sh
blob: 6e1ef15c6b673d7faf335c226e50ac98d98bbebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

set -o xtrace
curpwd=`pwd`
TRACE_FILE=trace.txt
TRACEDIR=/sys/kernel/debug/tracing

bash -c "echo 0 > $TRACEDIR/tracing_on"
sleep 1
bash -c "cat $TRACEDIR/trace > /tmp/$TRACE_FILE"

bash -c "echo > $TRACEDIR/set_event"
bash -c "echo > $TRACEDIR/trace"
sysctl kernel.ftrace_enabled=0
bash -c "echo nop > $TRACEDIR/current_tracer"

set +o xtrace
cd $curpwd