X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tags%2Fltt-control-0.51-12082008%2Flttctl%2Fltt-armtap.sh;fp=tags%2Fltt-control-0.51-12082008%2Flttctl%2Fltt-armtap.sh;h=84f91d669b7f8c855d6b02ef8673e3f4864a9d6a;hb=366ebe807eb22cd9480583f12eec527db0498987;hp=0000000000000000000000000000000000000000;hpb=efae29c4ba8f8842e83349a01b29ae5a8e3d721f;p=ltt-control.git diff --git a/tags/ltt-control-0.51-12082008/lttctl/ltt-armtap.sh b/tags/ltt-control-0.51-12082008/lttctl/ltt-armtap.sh new file mode 100755 index 0000000..84f91d6 --- /dev/null +++ b/tags/ltt-control-0.51-12082008/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 + +