lttctl ltt-armall updated to new debugfs
[ltt-control.git] / trunk / ltt-control / lttctl / ltt-disarmall.sh
index 83e81ce1bea5051d9bcccc70bb0aa7bf8a2962b1..2473b815bf4c2a713b8ef71300717c5878a4edd9 100755 (executable)
@@ -1,26 +1,38 @@
-#excluding locking
-#excluding core markers, not connected to default.
-echo Disconnecting all markers
-MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u|grep -v ^metadata|grep -v ^locking|grep -v ^lockdep|grep -v ^tap`
-
-
-#separator is newline, ensure compatibility with bash and ash
-N="
-"
-
-IFS=${N}
-for a in $MARKERS; do echo Disconnecting $a; echo "disconnect $a" > /proc/ltt; done
+#excluding core markers (already connected)
+#excluding locking markers (high traffic)
 
-# Markers starting with "tap_" are considered high-speed.
-echo Disconnecting high-rate markers to tap
-MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u |grep ^tap`
+DEBUGFSROOT=$(grep ^debugfs /proc/mounts | head -1 | awk '{print $2}')
+MARKERSROOT=${DEBUGFSROOT}/ltt/markers
 
-#Uncomment the following to also stop recording lockdep events.
-#MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -e ^tap_ -e ^lockdep`
-
-IFS=${N}
-for a in $MARKERS; do
-       echo Disconnecting $a
+echo Disconnecting all markers
 
-       echo "disconnect $a ltt_tap_marker" > /proc/ltt
+for c in ${MARKERSROOT}/*; do
+       case ${c} in
+       ${MARKERSROOT}/metadata)
+               ;;
+       ${MARKERSROOT}/locking)
+               ;;
+       ${MARKERSROOT}/lockdep)
+               ;;
+       *)
+               for m in ${c}/*; do
+                       echo Disconnecting ${m}
+                       echo 0 > ${m}/enable
+               done
+               ;;
+       esac
 done
+
+## Markers starting with "tap_" are considered high-speed.
+#echo Disconnecting high-rate markers to tap
+#MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u |grep ^tap`
+#
+##Uncomment the following to also stop recording lockdep events.
+##MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -e ^tap_ -e ^lockdep`
+#
+#IFS=${N}
+#for a in $MARKERS; do
+#      echo Disconnecting $a
+#
+#      echo "disconnect $a ltt_tap_marker" > /proc/ltt
+#done
This page took 0.022573 seconds and 4 git commands to generate.