lttctl ltt-armall updated to new debugfs
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 11 Feb 2009 08:04:26 +0000 (08:04 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 11 Feb 2009 08:04:26 +0000 (08:04 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@3316 04897980-b3bd-0310-b5e0-8ef037075253

trunk/ltt-control/configure.in
trunk/ltt-control/lttctl/ltt-armall.sh
trunk/ltt-control/lttctl/ltt-disarmall.sh

index 55feebfb1cc96be6a809a317bfe5c00376980341..36eac0a6912fa6ec15c8162b1141a87477617c87 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(ltt-control,0.64-14012009)
+AM_INIT_AUTOMAKE(ltt-control,0.65-11022009)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index fe103d14a98ea3dc3c8e6a61a2f33c0911d0336c..f0824c819eebab7a9656b2ebf69714a10b5b46c1 100755 (executable)
@@ -1,58 +1,47 @@
 #excluding core markers (already connected)
 #excluding locking markers (high traffic)
 
+DEBUGFSROOT=$(grep ^debugfs /proc/mounts | head -1 | awk '{print $2}')
+MARKERSROOT=${DEBUGFSROOT}/ltt/markers
+
 echo Connecting all markers
-MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u|grep -v ^metadata|grep -v ^locking|grep -v ^lockdep`
 
-#separator is newline, ensure compatibility with bash and ash
-N="
-"
+for c in ${MARKERSROOT}/*; do
+       case ${c} in
+       ${MARKERSROOT}/metadata)
+               ;;
+       ${MARKERSROOT}/locking)
+               ;;
+       ${MARKERSROOT}/lockdep)
+               ;;
+       *)
+               for m in ${c}/*; do
+                       echo Connecting ${m}
+                       echo 1 > ${m}/enable
+               done
+               ;;
+       esac
+done
 
-IFS=${N}
-for a in $MARKERS; do
-       echo Connecting $a
 
-       echo "connect $a default" > /proc/ltt
+# Connect the interesting high-speed markers to the marker tap.
+# Markers starting with "tap_" are considered high-speed.
+#echo Connecting high-rate markers to tap
+#MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u |grep ^tap_`
+#
+##Uncomment the following to also record 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 Connecting $a
+#
 #      #redirect markers carrying state information to dedicated channels
 #      case $a in
-#      list_process_state|list_file_descriptor|user_generic_thread_brand|fs_exec|kernel_process_fork|kernel_process_free|kernel_process_exit|kernel_arch_kthread_create|list_statedump_end|list_vm_map)
-#              CHANNEL=processes
-#              ;;
-#      list_interrupt|statedump_idt_table|statedump_sys_call_table|statedump_softirq_vec)
-#              CHANNEL=interrupts
-#              ;;
-#      list_network_ipv4_interface|list_network_ip_interface)
-#              CHANNEL=network
-#              ;;
-#      list_module|kernel_module_load|kernel_module_free)
-#              CHANNEL=modules
-#              ;;
 #      *)
 #              CHANNEL=
 #              ;;
 #      esac
-
-done
-
-
-# Connect the interesting high-speed markers to the marker tap.
-# Markers starting with "tap_" are considered high-speed.
-echo Connecting high-rate markers to tap
-MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u |grep ^tap_`
-
-#Uncomment the following to also record 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 Connecting $a
-
-       #redirect markers carrying state information to dedicated channels
-       case $a in
-       *)
-               CHANNEL=
-               ;;
-       esac
-
-       echo "connect $a ltt_tap_marker" > /proc/ltt
-done
+#
+#      echo "connect $a ltt_tap_marker" > /proc/ltt
+#done
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.025759 seconds and 4 git commands to generate.