Add project status to readme
[ltt-control.git] / lttctl / ltt-armtap.sh
CommitLineData
ed2849af
MD
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
6a62174b 17# This script will enable the system-wide tap on the given list of events passed
18# 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
23echo Connecting function markers
24
25# interesting period starts with the list of events passed as parameter.
26START_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...
33STOP_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
35for a in $START_FTRACE; do
36 STOP_FTRACE=`echo $STOP_FTRACE|sed 's/$a//'`
37done
38
39
40for a in $STOP_FTRACE; do
41 echo Connecting stop $a
42 echo "connect $a ftrace_system_stop" > /proc/ltt
43done
44
45for a in $START_FTRACE; do
46 echo Connecting start $a
47 echo "connect $a ftrace_system_start" > /proc/ltt
48done
49
50
This page took 0.025046 seconds and 4 git commands to generate.