update tap scripts
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 12 Aug 2008 14:20:17 +0000 (14:20 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 12 Aug 2008 14:20:17 +0000 (14:20 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2997 04897980-b3bd-0310-b5e0-8ef037075253

trunk/ltt-control/lttctl/ltt-armtap.sh [new file with mode: 0755]
trunk/ltt-control/lttctl/ltt-disarmtap.sh [new file with mode: 0755]

diff --git a/trunk/ltt-control/lttctl/ltt-armtap.sh b/trunk/ltt-control/lttctl/ltt-armtap.sh
new file mode 100755 (executable)
index 0000000..84f91d6
--- /dev/null
@@ -0,0 +1,34 @@
+# This script will enable the system-wide tap on the given list of events passed
+# as parameter, and stop the tap at each other "normal rate" events.
+
+#excluding core markers (already connected)
+#excluding locking markers (high traffic)
+
+echo Connecting function markers
+
+# interesting period starts with the list of events passed as parameter.
+START_FTRACE=$*
+
+# interesting period may stop with one specific event, but also try to keep the
+# other START_FTRACE events triggers to the lowest possible overhead by stopping
+# function trace at every other events.
+# Do _not_ disable function tracing in ftrace_entry event unless you really only
+# want the first function entry...
+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_`
+
+for a in $START_FTRACE; do
+       STOP_FTRACE=`echo $STOP_FTRACE|sed 's/$a//'`
+done
+
+
+for a in $STOP_FTRACE; do
+       echo Connecting stop $a
+       echo "connect $a ftrace_system_stop" > /proc/ltt
+done
+
+for a in $START_FTRACE; do
+       echo Connecting start $a
+       echo "connect $a ftrace_system_start" > /proc/ltt
+done
+
+
diff --git a/trunk/ltt-control/lttctl/ltt-disarmtap.sh b/trunk/ltt-control/lttctl/ltt-disarmtap.sh
new file mode 100755 (executable)
index 0000000..b41f70c
--- /dev/null
@@ -0,0 +1,33 @@
+# This script will disable the system-wide tap on the given list of events
+# passed as parameter, and stop the tap at each other "normal rate" events.
+
+#excluding core markers (already connected)
+#excluding locking markers (high traffic)
+
+echo Disconnecting function markers
+
+# interesting period starts with the list of events passed as parameter.
+START_FTRACE=$*
+
+# interesting period may stop with one specific event, but also try to keep the
+# other START_FTRACE events triggers to the lowest possible overhead by stopping
+# function trace at every other events.
+# Do _not_ disable function tracing in ftrace_entry event unless you really only
+# want the first function entry...
+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_`
+
+for a in $START_FTRACE; do
+       STOP_FTRACE=`echo $STOP_FTRACE|sed 's/$a//'`
+done
+
+for a in $START_FTRACE; do
+       echo Disconnecting start $a
+       echo "disconnect $a ftrace_system_start" > /proc/ltt
+done
+
+for a in $STOP_FTRACE; do
+       echo Disconnecting stop $a
+       echo "disconnect $a ftrace_system_stop" > /proc/ltt
+done
+
+
This page took 0.024321 seconds and 4 git commands to generate.