diff options
author | trz <trz> | 2005-06-21 14:13:01 +0000 |
---|---|---|
committer | trz <trz> | 2005-06-21 14:13:01 +0000 |
commit | aac3ed25e8dc7355b5f28fae2878f644df14ef7d (patch) | |
tree | c2d284ccffb7dd9a82b000bd9c7152e5abbf160f /runtime/probes | |
parent | bd2b1e6816b486d5c85a4693f0b3579df4376ed5 (diff) | |
download | systemtap-steved-aac3ed25e8dc7355b5f28fae2878f644df14ef7d.tar.gz systemtap-steved-aac3ed25e8dc7355b5f28fae2878f644df14ef7d.tar.xz systemtap-steved-aac3ed25e8dc7355b5f28fae2878f644df14ef7d.zip |
Added merging/sorting of per-cpu data, transport config/selection by probe, etc
Diffstat (limited to 'runtime/probes')
-rw-r--r-- | runtime/probes/ChangeLog | 7 | ||||
-rw-r--r-- | runtime/probes/shellsnoop/shellsnoop.c | 12 | ||||
-rwxr-xr-x | runtime/probes/shellsnoop/stp | 23 | ||||
-rwxr-xr-x | runtime/probes/tasklet/stp | 15 | ||||
-rw-r--r-- | runtime/probes/tasklet/stp_tasklet.c | 14 | ||||
-rwxr-xr-x | runtime/probes/test4/stp | 15 | ||||
-rw-r--r-- | runtime/probes/test4/test4.c | 12 | ||||
-rw-r--r-- | runtime/probes/where_func/kprobe_where_funct.c | 12 | ||||
-rwxr-xr-x | runtime/probes/where_func/stp | 18 |
9 files changed, 78 insertions, 50 deletions
diff --git a/runtime/probes/ChangeLog b/runtime/probes/ChangeLog index 2464a5c3..d4e31b88 100644 --- a/runtime/probes/ChangeLog +++ b/runtime/probes/ChangeLog @@ -1,3 +1,10 @@ +2005-06-20 Tom Zanussi <zanussi@us.ibm.com> + + * added transport_mode, subbuf_size, n_subbufs to all + probes and changed _stp_transport_open() calls. + + * removed all obsolete params from stp scripts. + 2005-06-18 Martin Hunt <hunt@redhat.com> * build: Modified to use build_probe. diff --git a/runtime/probes/shellsnoop/shellsnoop.c b/runtime/probes/shellsnoop/shellsnoop.c index 86d2e54d..21ad6b18 100644 --- a/runtime/probes/shellsnoop/shellsnoop.c +++ b/runtime/probes/shellsnoop/shellsnoop.c @@ -1,7 +1,17 @@ #define STP_NETLINK_ONLY #define STP_NUM_STRINGS 1 + +static unsigned n_subbufs = 4; +static unsigned subbuf_size = 65536; + #include "runtime.h" +#ifdef STP_NETLINK_ONLY +static int transport_mode = STP_TRANSPORT_NETLINK; +#else +static int transport_mode = STP_TRANSPORT_RELAYFS; +#endif + #define NEED_INT64_VALS #define NEED_STRING_VALS @@ -118,7 +128,7 @@ int init_module(void) return -1; } - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { + if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { printk("init_module: Couldn't open transport\n"); return -1; } diff --git a/runtime/probes/shellsnoop/stp b/runtime/probes/shellsnoop/stp index ac5472f8..4baf70ff 100755 --- a/runtime/probes/shellsnoop/stp +++ b/runtime/probes/shellsnoop/stp @@ -7,8 +7,8 @@ else exit fi -RELAYFS=`grep " relayfs_mmap" /proc/kallsyms` -if [ "$RELAYFS" == "" ] +RELAYFS=`lsmod | grep relayfs |awk '{print $1}'` +if [ "$RELAYFS" != "relayfs" ] then /sbin/insmod ../../relayfs/relayfs.ko fi @@ -32,18 +32,11 @@ fi #/sbin/insmod $modulename -# print to screen only, 4 8K buffers -#../../stpd/stpd -p -b 8192 -n 4 +# print to screen only +#../../stpd/stpd -p $modulename -# print to screen -../../stpd/stpd -b 8192 -n 4 $modulename - -# log to files (relayfs), 4 8K buffers -#../../stpd/stpd -r -b 65536 -n 4 $modulename - -# print to screen and log to files, 4 8K buffers -#../../stpd/stpd -b 8192 -n 4 - -# no screen or log -#../../stpd/stpd -q -b 8192 -n 4 +# 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 diff --git a/runtime/probes/tasklet/stp b/runtime/probes/tasklet/stp index 185a5905..4baf70ff 100755 --- a/runtime/probes/tasklet/stp +++ b/runtime/probes/tasklet/stp @@ -32,14 +32,11 @@ fi #/sbin/insmod $modulename -# print to screen only, 4 8K buffers -#../../stpd/stpd -p -b 8192 -n 4 +# print to screen only +#../../stpd/stpd -p $modulename -# print to screen and log to files, 4 8K buffers -../../stpd/stpd -b 8192 -n 4 $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 or log -#../../stpd/stpd -q -b 8192 -n 4 - -# stpd will remove module when it exits -#/sbin/rmmod $modulename +# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module) +#../../stpd/stpd -q $modulename diff --git a/runtime/probes/tasklet/stp_tasklet.c b/runtime/probes/tasklet/stp_tasklet.c index 68569fb5..c6e7b132 100644 --- a/runtime/probes/tasklet/stp_tasklet.c +++ b/runtime/probes/tasklet/stp_tasklet.c @@ -4,9 +4,19 @@ #define STP_NETLINK_ONLY #define STP_NUM_STRINGS 1 + +static unsigned n_subbufs = 4; +static unsigned subbuf_size = 65536; + #include "runtime.h" -#include "probes.c" +#ifdef STP_NETLINK_ONLY +static int transport_mode = STP_TRANSPORT_NETLINK; +#else +static int transport_mode = STP_TRANSPORT_RELAYFS; +#endif + +#include "probes.c" MODULE_DESCRIPTION("test jprobes of tasklets"); MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>"); @@ -42,7 +52,7 @@ int init_module(void) return -1; } - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { + if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { printk("init_dtr: Couldn't open transport\n"); return -1; } diff --git a/runtime/probes/test4/stp b/runtime/probes/test4/stp index 185a5905..4baf70ff 100755 --- a/runtime/probes/test4/stp +++ b/runtime/probes/test4/stp @@ -32,14 +32,11 @@ fi #/sbin/insmod $modulename -# print to screen only, 4 8K buffers -#../../stpd/stpd -p -b 8192 -n 4 +# print to screen only +#../../stpd/stpd -p $modulename -# print to screen and log to files, 4 8K buffers -../../stpd/stpd -b 8192 -n 4 $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 or log -#../../stpd/stpd -q -b 8192 -n 4 - -# stpd will remove module when it exits -#/sbin/rmmod $modulename +# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module) +#../../stpd/stpd -q $modulename diff --git a/runtime/probes/test4/test4.c b/runtime/probes/test4/test4.c index 9867d8ef..ac446bbb 100644 --- a/runtime/probes/test4/test4.c +++ b/runtime/probes/test4/test4.c @@ -1,7 +1,17 @@ #define STP_NETLINK_ONLY #define STP_NUM_STRINGS 1 + +static unsigned n_subbufs = 4; +static unsigned subbuf_size = 65536; + #include "runtime.h" +#ifdef STP_NETLINK_ONLY +static int transport_mode = STP_TRANSPORT_NETLINK; +#else +static int transport_mode = STP_TRANSPORT_RELAYFS; +#endif + #define NEED_INT64_VALS #define NEED_STAT_VALS @@ -71,7 +81,7 @@ int init_module(void) return -1; } - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { + if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { printk("init: Couldn't open transport\n"); return -1; } diff --git a/runtime/probes/where_func/kprobe_where_funct.c b/runtime/probes/where_func/kprobe_where_funct.c index e029a080..d0d720df 100644 --- a/runtime/probes/where_func/kprobe_where_funct.c +++ b/runtime/probes/where_func/kprobe_where_funct.c @@ -6,8 +6,18 @@ #define STP_NETLINK_ONLY #define STP_NUM_STRINGS 1 + +static unsigned n_subbufs = 4; +static unsigned subbuf_size = 65536; + #include "runtime.h" +#ifdef STP_NETLINK_ONLY +static int transport_mode = STP_TRANSPORT_NETLINK; +#else +static int transport_mode = STP_TRANSPORT_RELAYFS; +#endif + #define NEED_INT64_VALS #define KEY1_TYPE INT64 @@ -59,7 +69,7 @@ int init_module(void) return -1; } - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { + if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { printk("init_dtr: Couldn't open transport\n"); return -1; } diff --git a/runtime/probes/where_func/stp b/runtime/probes/where_func/stp index ca0cb63c..4baf70ff 100755 --- a/runtime/probes/where_func/stp +++ b/runtime/probes/where_func/stp @@ -32,17 +32,11 @@ fi #/sbin/insmod $modulename -# print to screen only, 4 8K buffers -#../../stpd/stpd -p -b 8192 -n 4 +# print to screen only +#../../stpd/stpd -p $modulename -# print to screen and log to files, 4 8K buffers -../../stpd/stpd -b 8192 -n 4 $modulename +# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module) +../../stpd/stpd $modulename -# print to screen and log to files, 4 8K buffers -#../../stpd/stpd -b 8192 -n 4 - -# no screen or log -#../../stpd/stpd -q -b 8192 -n 4 - -# stpd will remove module when it exits -#/sbin/rmmod $modulename +# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module) +#../../stpd/stpd -q $modulename |