]> sourceware.org Git - systemtap.git/commitdiff
2005-07-11 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Tue, 12 Jul 2005 00:32:11 +0000 (00:32 +0000)
committerhunt <hunt>
Tue, 12 Jul 2005 00:32:11 +0000 (00:32 +0000)
* build_probe: Set RELAYFS correctly.

* Makefile.template: Fix for RELAYFS.

* stp: Moved here.  All probes now use this copy.

* ALL/stp: source the master copy of stp.

12 files changed:
runtime/probes/ChangeLog
runtime/probes/Makefile.template
runtime/probes/agg/stp
runtime/probes/bench/stp
runtime/probes/build_probe
runtime/probes/os_timer/stp
runtime/probes/scf/stp
runtime/probes/shellsnoop/stp
runtime/probes/stp [new file with mode: 0755]
runtime/probes/tasklet/stp
runtime/probes/test4/stp
runtime/probes/where_func/stp

index 64c5d34ed272617075c4b62a69b16abf27ba376f..db09d02846bd79fc7fc3cd289b40eabf6fd460a6 100644 (file)
@@ -1,3 +1,13 @@
+2005-07-11  Martin Hunt  <hunt@redhat.com>
+
+       * build_probe: Set RELAYFS correctly.
+
+       * Makefile.template: Fix for RELAYFS.
+
+       * stp: Moved here.  All probes now use this copy.
+
+       * ALL/stp: source the master copy of stp.
+
 2005-07-08  Martin Hunt  <hunt@redhat.com>
 
        * ALL: Use new runtime.h. Change init_module()
index 23122fabd9f099d30f0b16976173082f2fdd7036..886bef8e1e9e62f72dfd85c7c9db47b927115920 100644 (file)
@@ -8,7 +8,7 @@ KALLSYMS_LOOKUP_NAME    := 0x$(firstword $(shell grep " kallsyms_lookup_name" /boot
 KALLSYMS_LOOKUP        := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
 KTA    := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
 
-FLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
+FLAGS := -I $(RT) RELAYFS -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
 
 DFLAGS := $(FLAGS) -D DEBUG
 
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
index 8c2301c41425a9414297ff386f2faee1faacc943..00236805b5e6efa43332f47228055a9ae90d28e5 100755 (executable)
@@ -7,10 +7,14 @@ else
     exit
 fi
 
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
+RELAYFS=`grep " relayfs_poll" /boot/System.map-\`uname -r\``
+if [ -z "$RELAYFS" ]
 then
+    RELAYFS=`lsmod | grep relayfs`
+    if [ -z "$RELAYFS" ]
+    then
        /sbin/insmod ../../relayfs/relayfs.ko
+    fi
 fi
 
 if [ ! -d "/mnt/relay" ]
index 9eadebd2b3f09d0391487e803ca122db8c96b46c..7e3207b130675133c42c510f1d7e422d0a989a74 100755 (executable)
@@ -7,7 +7,7 @@ proc usage {} {
 }
 
 # use Makefile.template to generate a Makefile
-proc create_makefile {target} {
+proc create_makefile {target relayfs} {
   if {[catch {open ../Makefile.template r} fd]} {
     puts "ERROR opening ../Makefile.template"
     exit -1
@@ -20,6 +20,9 @@ proc create_makefile {target} {
     if {[regsub XXX $line $target newline]} {
       set line $newline
     }
+    if {[regsub RELAYFS $line $relayfs newline]} {
+      set line $newline
+    }
     puts $mfd $line
   }
   close $fd
@@ -123,10 +126,15 @@ foreach arg $argv {
   }
 }
 
+set relayfs ""
+if {![file exists /lib/modules/[exec uname -r]/build/include/linux/relayfs_fs.h]} {
+  set relayfs {-I $(RT)/relayfs}
+}
+
 if {![catch {open targets r} tfd]} {
   while {[gets $tfd line] >= 0} {
     set target [lindex $line 0]
-    create_makefile $target
+    create_makefile $target $relayfs
     build $target
     catch {exec /bin/rm Makefile}
   }
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
diff --git a/runtime/probes/stp b/runtime/probes/stp
new file mode 100755 (executable)
index 0000000..f045a9e
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+if [ -n "$1" ]
+then
+    modulename=$1
+else
+    echo "Usage: stp modulename"
+    exit
+fi
+
+RELAYFS=`grep " relayfs_poll" /boot/System.map-\`uname -r\``
+if [ -z "$RELAYFS" ]
+then
+    RELAYFS=`lsmod | grep relayfs`
+    if [ -z "$RELAYFS" ]
+    then
+       /sbin/insmod ../../relayfs/relayfs.ko
+    fi
+fi
+
+if [ ! -d "/mnt/relay" ]
+then
+    mkdir /mnt/relay
+fi
+
+MOUNT=`mount | grep relayfs |awk '{print $1}'`
+if [ "$MOUNT" != "relayfs" ]
+then
+       mount -t relayfs relayfs /mnt/relay
+fi
+
+STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
+if [ "$STP_CONTROL" != "stp_control" ] 
+then
+       /sbin/insmod ../../transport/stp-control.ko
+fi
+
+# print to screen only
+#../../stpd/stpd -p $modulename
+
+# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
+../../stpd/stpd $modulename
+
+# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
+#../../stpd/stpd -q $modulename
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
index 4baf70ff1642e9e085fb89027ae956656107f4bd..f3feee707000c45117b7b1ec069fad3bb42ea36f 100755 (executable)
@@ -1,42 +1,2 @@
 #!/bin/bash
-if [ -n "$1" ]
-then
-    modulename=$1
-else
-    echo "Usage: stp modulename"
-    exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ] 
-then
-       /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
-    mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
-       mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ] 
-then
-       /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
This page took 0.294046 seconds and 5 git commands to generate.