diff options
-rw-r--r-- | runtime/probes/ChangeLog | 9 | ||||
-rw-r--r-- | runtime/probes/agg/count1.c | 14 | ||||
-rw-r--r-- | runtime/probes/agg/count2.c | 16 | ||||
-rw-r--r-- | runtime/probes/agg/stat1.c | 16 | ||||
-rwxr-xr-x | runtime/probes/agg/stp | 15 | ||||
-rw-r--r-- | runtime/probes/scf/scf.c | 16 | ||||
-rwxr-xr-x | runtime/probes/scf/stp | 15 | ||||
-rw-r--r-- | runtime/probes/shellsnoop/shellsnoop.c | 24 | ||||
-rw-r--r-- | runtime/probes/tasklet/stp_tasklet.c | 26 | ||||
-rw-r--r-- | runtime/probes/test4/test4.c | 23 | ||||
-rw-r--r-- | runtime/probes/where_func/kprobe_where_funct.c | 24 |
11 files changed, 32 insertions, 166 deletions
diff --git a/runtime/probes/ChangeLog b/runtime/probes/ChangeLog index d4e31b88..d6cbc5c0 100644 --- a/runtime/probes/ChangeLog +++ b/runtime/probes/ChangeLog @@ -1,3 +1,12 @@ +2005-06-23 Martin Hunt <hunt@redhat.com> + + * all probes: MOdified to use latest changes to transport.h. + +2005-06-21 Martin Hunt <hunt@redhat.com> + + * build_probe (build): Add relay_flush and relay_switch_subbuf to the + list of undefines to ignore. + 2005-06-20 Tom Zanussi <zanussi@us.ibm.com> * added transport_mode, subbuf_size, n_subbufs to all diff --git a/runtime/probes/agg/count1.c b/runtime/probes/agg/count1.c index 870dc32e..4b0ba1bf 100644 --- a/runtime/probes/agg/count1.c +++ b/runtime/probes/agg/count1.c @@ -70,23 +70,11 @@ static struct kprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct kprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; opens = _stp_counter_init(); reads = _stp_counter_init(); diff --git a/runtime/probes/agg/count2.c b/runtime/probes/agg/count2.c index ab13f5af..ea75f4bd 100644 --- a/runtime/probes/agg/count2.c +++ b/runtime/probes/agg/count2.c @@ -5,7 +5,7 @@ #include "counter.c" #include "probes.c" -MODULE_DESCRIPTION("SystemTap probe: count1"); +MODULE_DESCRIPTION("SystemTap probe: count2"); MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>"); Counter opens; @@ -54,23 +54,11 @@ static struct jprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; opens = _stp_counter_init(); reads = _stp_counter_init(); diff --git a/runtime/probes/agg/stat1.c b/runtime/probes/agg/stat1.c index 1d3cb3b0..54e22db5 100644 --- a/runtime/probes/agg/stat1.c +++ b/runtime/probes/agg/stat1.c @@ -5,7 +5,7 @@ #include "counter.c" #include "probes.c" -MODULE_DESCRIPTION("SystemTap probe: count1"); +MODULE_DESCRIPTION("SystemTap probe: stat1"); MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>"); @@ -51,23 +51,11 @@ static struct jprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; opens = _stp_counter_init(); reads = _stp_stat_init(HIST_LOG,24); diff --git a/runtime/probes/agg/stp b/runtime/probes/agg/stp index 185a5905..4baf70ff 100755 --- a/runtime/probes/agg/stp +++ b/runtime/probes/agg/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/scf/scf.c b/runtime/probes/scf/scf.c index a8798f51..74900152 100644 --- a/runtime/probes/scf/scf.c +++ b/runtime/probes/scf/scf.c @@ -36,28 +36,14 @@ static struct kprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct kprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; map1 = _stp_map_new_str (100, INT64); - ret = _stp_register_kprobes (stp_probes, MAX_STP_ROUTINE); - return ret; } diff --git a/runtime/probes/scf/stp b/runtime/probes/scf/stp index 185a5905..4baf70ff 100755 --- a/runtime/probes/scf/stp +++ b/runtime/probes/scf/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/shellsnoop/shellsnoop.c b/runtime/probes/shellsnoop/shellsnoop.c index 21ad6b18..d37adcc9 100644 --- a/runtime/probes/shellsnoop/shellsnoop.c +++ b/runtime/probes/shellsnoop/shellsnoop.c @@ -1,17 +1,8 @@ -#define STP_NETLINK_ONLY +//#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 @@ -115,23 +106,12 @@ static struct jprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); int init_module(void) { int ret; - if (!pid) { - printk("init_module: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { - printk("init_module: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; pids = _stp_map_new_int64 (10000, INT64); arglist = _stp_list_new (10, STRING); diff --git a/runtime/probes/tasklet/stp_tasklet.c b/runtime/probes/tasklet/stp_tasklet.c index c6e7b132..46dacf03 100644 --- a/runtime/probes/tasklet/stp_tasklet.c +++ b/runtime/probes/tasklet/stp_tasklet.c @@ -5,17 +5,7 @@ #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 - #include "probes.c" MODULE_DESCRIPTION("test jprobes of tasklets"); @@ -38,25 +28,11 @@ static struct jprobe stp_probes[] = { }; #define MAX_STP_PROBES (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) - { - printk("init_dtr: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { - printk("init_dtr: Couldn't open transport\n"); - return -1; - } - + TRANSPORT_OPEN; ret = _stp_register_jprobes (stp_probes, MAX_STP_PROBES); return ret; } diff --git a/runtime/probes/test4/test4.c b/runtime/probes/test4/test4.c index ac446bbb..313228e9 100644 --- a/runtime/probes/test4/test4.c +++ b/runtime/probes/test4/test4.c @@ -1,17 +1,8 @@ #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 @@ -68,23 +59,11 @@ static struct jprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; /* FIXME. Check return values */ opens = _stp_map_new_str (1000, INT64); diff --git a/runtime/probes/where_func/kprobe_where_funct.c b/runtime/probes/where_func/kprobe_where_funct.c index d0d720df..cf80bb94 100644 --- a/runtime/probes/where_func/kprobe_where_funct.c +++ b/runtime/probes/where_func/kprobe_where_funct.c @@ -7,17 +7,8 @@ #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 @@ -55,24 +46,11 @@ static struct kprobe kp[] = { }; #define MAX_KPROBES (sizeof(kp)/sizeof(struct kprobe)) - -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init_dtr: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { - printk("init_dtr: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; funct_locations = _stp_map_new_int64 (1000, INT64); |