[PATCH 2/2] lttctl: Set correct state events channels on armall

Jan Kiszka <[email protected]> Wed, 27 Feb 2008 13:41:25 +0100
Newsgroups gmane.linux.kernel.tracing
Message-ID <[email protected]>
Currently ltt-armall directs every marker event to the cpu channel. This
patch starts distributing important state events to the related channels
under control/. This helps, e.g., to keep track of process names in
hybrid mode where the cpu channel is overwritten and only the control
channels are read continuously.

Signed-off-by: Jan Kiszka <[email protected]>

---
 lttctl/ltt-armall.sh |   22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

Index: b/lttctl/ltt-armall.sh
===================================================================
--- a/lttctl/ltt-armall.sh
+++ b/lttctl/ltt-armall.sh
@@ -11,4 +11,24 @@ MARKERS=`cat /proc/ltt|grep -v %k|awk '{
 echo Connecting internal_kernel_sched_schedule
 echo "connect internal_kernel_sched_schedule scheduler" > /proc/ltt
 
-for a in $MARKERS; do echo Connecting $a; echo "connect $a default" > /proc/ltt; done
+for a in $MARKERS; do
+	echo Connecting $a
+
+	#redirect markers carrying state information to dedicated channels
+	case $a in
+	list_process_state|user_generic_thread_brand|fs_exec|kernel_process_fork|kernel_process_free|kernel_process_exit|kernel_arch_kthread_create)
+		CHANNEL=processes
+		;;
+	list_interrupt)
+		CHANNEL=interrupts
+		;;
+	kernel_module_load|kernel_module_free)
+		CHANNEL=modules
+		;;
+	*)
+		CHANNEL=
+		;;
+	esac
+
+	echo "connect $a default dynamic $CHANNEL" > /proc/ltt
+done