From 979f20e0ecb8d287af1aedf33ac0c3b50ac9003d Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 7 Apr 2005 15:12:19 +0000 Subject: Update to use relayfs, new I/O. --- runtime/probes/tasklet/stp_tasklet.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'runtime/probes/tasklet/stp_tasklet.c') 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<"); 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); -- cgit