apply zhaolei updates
[lttv.git] / trunk / ltt-control / lttctl / ltt-disarmall.sh
index 4a3f92e446c8a57bbdffd4fab48c0fd53c73db06..83e81ce1bea5051d9bcccc70bb0aa7bf8a2962b1 100755 (executable)
@@ -1,17 +1,24 @@
 #excluding locking
 #excluding core markers, not connected to default.
 echo Disconnecting all markers
-MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_|grep -v ^lockdep_|grep -v ^lockdep|grep -v ^tap_`
-for a in $MARKERS; do echo Disconnecting $a; echo "disconnect $a" > /proc/ltt; done
+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
 
 # Markers starting with "tap_" are considered high-speed.
-echo Disconnecting high-rate markers from tap
-MARKERS=`cat /proc/ltt | grep ^tap_`
+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 -e ^tap_ -e ^lockdep`
+#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
 
This page took 0.023037 seconds and 4 git commands to generate.