From 024405bd6d7489a7c502509e1ed4ca48d8cd6296 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 12 Aug 2008 14:19:22 +0000 Subject: [PATCH] update tap scripts git-svn-id: http://ltt.polymtl.ca/svn@2996 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/ltt-control/lttctl/Makefile.am | 19 ++++++++++++++++-- trunk/ltt-control/lttctl/ltt-armall.sh | 24 ++++++++++++++++++++++- trunk/ltt-control/lttctl/ltt-disarmall.sh | 16 ++++++++++++++- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/trunk/ltt-control/lttctl/Makefile.am b/trunk/ltt-control/lttctl/Makefile.am index fef77e0..12ad501 100644 --- a/trunk/ltt-control/lttctl/Makefile.am +++ b/trunk/ltt-control/lttctl/Makefile.am @@ -3,9 +3,12 @@ AM_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_BIN_DIR=\""$(bindir)"\" bin_PROGRAMS = lttctl -bin_SCRIPTS = ltt-armall ltt-disarmall ltt-armalluser ltt-disarmalluser +bin_SCRIPTS = ltt-armall ltt-disarmall ltt-armalluser ltt-disarmalluser \ + ltt-armtap ltt-disarmtap CLEANFILES = $(bin_SCRIPTS) -EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh ltt-armalluser.sh ltt-disarmalluser.sh +EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh \ + ltt-armalluser.sh ltt-disarmalluser.sh \ + ltt-armtap.sh ltt-disarmtap.sh ltt-armall: ltt-armall.sh rm -f ltt-armall @@ -19,6 +22,18 @@ ltt-disarmall: ltt-disarmall.sh cat $(srcdir)/ltt-disarmall.sh >> ltt-disarmall chmod ugo+x ltt-disarmall +ltt-armtap: ltt-armtap.sh + rm -f ltt-armtap + echo "#!"$(BASH) > ltt-armtap + cat $(srcdir)/ltt-armtap.sh >> ltt-armtap + chmod ugo+x ltt-armtap + +ltt-disarmtap: ltt-disarmtap.sh + rm -f ltt-disarmtap + echo "#!"$(BASH) > ltt-disarmtap + cat $(srcdir)/ltt-disarmtap.sh >> ltt-disarmtap + chmod ugo+x ltt-disarmtap + ltt-armalluser: ltt-armalluser.sh rm -f ltt-armalluser echo "#!"$(BASH) > ltt-armalluser diff --git a/trunk/ltt-control/lttctl/ltt-armall.sh b/trunk/ltt-control/lttctl/ltt-armall.sh index 562ef15..ae6867d 100755 --- a/trunk/ltt-control/lttctl/ltt-armall.sh +++ b/trunk/ltt-control/lttctl/ltt-armall.sh @@ -2,7 +2,7 @@ #excluding locking markers (high traffic) echo Connecting all markers -MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_` +MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_|grep -v ^lockdep_` for a in $MARKERS; do echo Connecting $a @@ -28,3 +28,25 @@ for a in $MARKERS; do echo "connect $a default dynamic $CHANNEL" > /proc/ltt 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 ^tap_` + +#Uncomment the following to also record lockdep events. +#MARKERS=`cat /proc/ltt | grep -e ^tap_ -e ^lockdep` + +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 dynamic $CHANNEL" > /proc/ltt +done diff --git a/trunk/ltt-control/lttctl/ltt-disarmall.sh b/trunk/ltt-control/lttctl/ltt-disarmall.sh index aedcd55..4a3f92e 100755 --- a/trunk/ltt-control/lttctl/ltt-disarmall.sh +++ b/trunk/ltt-control/lttctl/ltt-disarmall.sh @@ -1,5 +1,19 @@ #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_` +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 starting with "tap_" are considered high-speed. +echo Disconnecting high-rate markers from tap +MARKERS=`cat /proc/ltt | grep ^tap_` + +#Uncomment the following to also stop recording lockdep events. +#MARKERS=`cat /proc/ltt | grep -e ^tap_ -e ^lockdep` + +for a in $MARKERS; do + echo Disconnecting $a + + echo "disconnect $a ltt_tap_marker" > /proc/ltt +done -- 2.34.1