From 393015fa2c81a38e9dac6075deb50df9b206d813 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 12 Aug 2008 14:20:17 +0000 Subject: [PATCH] update tap scripts git-svn-id: http://ltt.polymtl.ca/svn@2997 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/ltt-control/lttctl/ltt-armtap.sh | 34 +++++++++++++++++++++++ trunk/ltt-control/lttctl/ltt-disarmtap.sh | 33 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100755 trunk/ltt-control/lttctl/ltt-armtap.sh create mode 100755 trunk/ltt-control/lttctl/ltt-disarmtap.sh diff --git a/trunk/ltt-control/lttctl/ltt-armtap.sh b/trunk/ltt-control/lttctl/ltt-armtap.sh new file mode 100755 index 00000000..84f91d66 --- /dev/null +++ b/trunk/ltt-control/lttctl/ltt-armtap.sh @@ -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 index 00000000..b41f70c0 --- /dev/null +++ b/trunk/ltt-control/lttctl/ltt-disarmtap.sh @@ -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 + + -- 2.34.1