summaryrefslogtreecommitdiffstats
path: root/runtime/probes/where_func
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/probes/where_func')
-rw-r--r--runtime/probes/where_func/kprobe_where_funct.c12
-rwxr-xr-xruntime/probes/where_func/stp18
2 files changed, 17 insertions, 13 deletions
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