From 6615e1cff4b14af729b9d97723fcbf37fd3d7eb0 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 14 Jul 2008 21:09:34 +0000 Subject: [PATCH] add armalluser git-svn-id: http://ltt.polymtl.ca/svn@2955 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt-control/lttctl/Makefile.am | 16 ++++++++++++++-- ltt-control/lttctl/ltt-armall.sh | 9 +-------- ltt-control/lttctl/ltt-armalluser.sh | 17 +++++++++++++++++ ltt-control/lttctl/ltt-disarmalluser.sh | 17 +++++++++++++++++ 4 files changed, 49 insertions(+), 10 deletions(-) create mode 100755 ltt-control/lttctl/ltt-armalluser.sh create mode 100755 ltt-control/lttctl/ltt-disarmalluser.sh diff --git a/ltt-control/lttctl/Makefile.am b/ltt-control/lttctl/Makefile.am index d151bf6..fef77e0 100644 --- a/ltt-control/lttctl/Makefile.am +++ b/ltt-control/lttctl/Makefile.am @@ -3,9 +3,9 @@ AM_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_BIN_DIR=\""$(bindir)"\" bin_PROGRAMS = lttctl -bin_SCRIPTS = ltt-armall ltt-disarmall +bin_SCRIPTS = ltt-armall ltt-disarmall ltt-armalluser ltt-disarmalluser CLEANFILES = $(bin_SCRIPTS) -EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh +EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh ltt-armalluser.sh ltt-disarmalluser.sh ltt-armall: ltt-armall.sh rm -f ltt-armall @@ -19,6 +19,18 @@ ltt-disarmall: ltt-disarmall.sh cat $(srcdir)/ltt-disarmall.sh >> ltt-disarmall chmod ugo+x ltt-disarmall +ltt-armalluser: ltt-armalluser.sh + rm -f ltt-armalluser + echo "#!"$(BASH) > ltt-armalluser + cat $(srcdir)/ltt-armalluser.sh >> ltt-armalluser + chmod ugo+x ltt-armalluser + +ltt-disarmalluser: ltt-disarmalluser.sh + rm -f ltt-disarmalluser + echo "#!"$(BASH) > ltt-disarmalluser + cat $(srcdir)/ltt-disarmalluser.sh >> ltt-disarmalluser + chmod ugo+x ltt-disarmalluser + lttctl_SOURCES = \ lttctl.c lttctl_DEPENDENCIES = ../liblttctl/liblttctl.la diff --git a/ltt-control/lttctl/ltt-armall.sh b/ltt-control/lttctl/ltt-armall.sh index 3cb5f25..562ef15 100755 --- a/ltt-control/lttctl/ltt-armall.sh +++ b/ltt-control/lttctl/ltt-armall.sh @@ -1,15 +1,8 @@ #excluding core markers (already connected) #excluding locking markers (high traffic) -#scheduler probe -echo Loading probes -modprobe -q ltt-sched - echo Connecting all markers -MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_ |grep -v ^internal_` - -echo Connecting internal_kernel_sched_schedule -echo "connect internal_kernel_sched_schedule scheduler" > /proc/ltt +MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -v ^core_|grep -v ^locking_` for a in $MARKERS; do echo Connecting $a diff --git a/ltt-control/lttctl/ltt-armalluser.sh b/ltt-control/lttctl/ltt-armalluser.sh new file mode 100755 index 0000000..cd0a2eb --- /dev/null +++ b/ltt-control/lttctl/ltt-armalluser.sh @@ -0,0 +1,17 @@ +#excluding core markers (already connected) +#excluding locking markers (high traffic) + +echo Connecting all userspace markers + +for a in /proc/[0-9]*; do + echo Connecting markers in $a + + for marker in $a/markers; do + case $marker in + *) + CHANNEL= + ;; + esac + echo "connect $marker default dynamic $CHANNEL" > /proc/ltt + done +done diff --git a/ltt-control/lttctl/ltt-disarmalluser.sh b/ltt-control/lttctl/ltt-disarmalluser.sh new file mode 100755 index 0000000..55c3e6b --- /dev/null +++ b/ltt-control/lttctl/ltt-disarmalluser.sh @@ -0,0 +1,17 @@ +#excluding core markers (already connected) +#excluding locking markers (high traffic) + +echo Connecting all userspace markers + +for a in /proc/[0-9]*; do + echo Connecting markers in $a + + for marker in $a/markers; do + case $marker in + *) + CHANNEL= + ;; + esac + echo "disconnect $marker default dynamic $CHANNEL" > /proc/ltt + done +done -- 2.34.1