summaryrefslogtreecommitdiffstats
path: root/runtime/probes/tasklet/stp_tasklet.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/probes/tasklet/stp_tasklet.c')
-rw-r--r--runtime/probes/tasklet/stp_tasklet.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/runtime/probes/tasklet/stp_tasklet.c b/runtime/probes/tasklet/stp_tasklet.c
index aadb0c4c..f9274281 100644
--- a/runtime/probes/tasklet/stp_tasklet.c
+++ b/runtime/probes/tasklet/stp_tasklet.c
@@ -6,8 +6,10 @@
#define HASH_TABLE_SIZE (1<<HASH_TABLE_BITS)
#define BUCKETS 16 /* largest histogram width */
+#define STP_NETLINK_ONLY
+#define STP_NUM_STRINGS 1
+
#include "runtime.h"
-#include "io.c"
#include "probes.c"
MODULE_DESCRIPTION("test jprobes of tasklets");
@@ -16,7 +18,7 @@ MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>");
void inst__rcu_process_callbacks(struct rcu_ctrlblk *rcp,
struct rcu_state *rsp, struct rcu_data *rdp)
{
- dlog ("interrupt=%d\n", in_interrupt());
+ _stp_log ("interrupt=%d\n", in_interrupt());
jprobe_return();
}
@@ -31,15 +33,24 @@ static struct jprobe stp_probes[] = {
static int init_stp(void)
{
- int ret = _stp_register_jprobes (stp_probes, MAX_STP_PROBES);
- dlog("instrumentation is enabled...\n");
+ int ret;
+
+ if (_stp_netlink_open() < 0)
+ return -1;
+ ret = _stp_register_jprobes (stp_probes, MAX_STP_PROBES);
+ _stp_log ("instrumentation is enabled...\n");
return ret;
}
-static void cleanup_stp(void)
+static void probe_exit (void)
{
_stp_unregister_jprobes (stp_probes, MAX_STP_PROBES);
- dlog ("EXIT\n");
+ _stp_log ("EXIT\n");
+
+}
+static void cleanup_stp(void)
+{
+ _stp_netlink_close();
}
module_init(init_stp);