1 # Copyright 2009 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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.
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.
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.
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.
20 #excluding core markers (already connected)
21 #excluding locking markers (high traffic)
23 echo Connecting
function markers
25 # interesting period starts with the list of events passed as parameter.
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_`
35 for a
in $START_FTRACE; do
36 STOP_FTRACE
=`echo $STOP_FTRACE|sed 's/$a//'`
40 for a
in $STOP_FTRACE; do
41 echo Connecting stop
$a
42 echo "connect $a ftrace_system_stop" > /proc
/ltt
45 for a
in $START_FTRACE; do
46 echo Connecting start
$a
47 echo "connect $a ftrace_system_start" > /proc
/ltt
This page took 0.03133 seconds and 4 git commands to generate.