Update licensing: lgplv2.1 for libs, gplv2 for programs
[ltt-control.git] / lttctl / ltt-disarmtap.sh
1 # Copyright 2009 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
17 # This script will disable the system-wide tap on the given list of events
18 # passed as parameter, and stop the tap at each other "normal rate" events.
19
20 #excluding core markers (already connected)
21 #excluding locking markers (high traffic)
22
23 echo Disconnecting function markers
24
25 # interesting period starts with the list of events passed as parameter.
26 START_FTRACE=$*
27
28 # interesting period may stop with one specific event, but also try to keep the
29 # other START_FTRACE events triggers to the lowest possible overhead by stopping
30 # function trace at every other events.
31 # Do _not_ disable function tracing in ftrace_entry event unless you really only
32 # want the first function entry...
33 STOP_FTRACE=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_|grep -v ^lockdep|grep -v ftrace_entry|grep -v ^tap_`
34
35 for a in $START_FTRACE; do
36 STOP_FTRACE=`echo $STOP_FTRACE|sed 's/$a//'`
37 done
38
39 for a in $START_FTRACE; do
40 echo Disconnecting start $a
41 echo "disconnect $a ftrace_system_start" > /proc/ltt
42 done
43
44 for a in $STOP_FTRACE; do
45 echo Disconnecting stop $a
46 echo "disconnect $a ftrace_system_stop" > /proc/ltt
47 done
48
49
This page took 0.036899 seconds and 4 git commands to generate.