summaryrefslogtreecommitdiffstats
path: root/runtime/probes.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-07-01 19:26:17 +0000
committerhunt <hunt>2005-07-01 19:26:17 +0000
commitf5548c07826ab136c199055769ccfc34e01c0cd7 (patch)
tree738aed9f3e2cb9158ca58ac8d1e73bfba73dae86 /runtime/probes.c
parent9a45e491a7365db5178c4b6c33804ce3fc07ffe0 (diff)
downloadsystemtap-steved-f5548c07826ab136c199055769ccfc34e01c0cd7.tar.gz
systemtap-steved-f5548c07826ab136c199055769ccfc34e01c0cd7.tar.xz
systemtap-steved-f5548c07826ab136c199055769ccfc34e01c0cd7.zip
2005-07-01 Martin Hunt <hunt@redhat.com>
* probes.c: Convert all _stp_log() calls to either stp_warn() or dbug(). * print.c: Comment out dbug()s. * stat-common.c: Comment out dbug()s.
Diffstat (limited to 'runtime/probes.c')
-rw-r--r--runtime/probes.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/runtime/probes.c b/runtime/probes.c
index 7922c133..bb410915 100644
--- a/runtime/probes.c
+++ b/runtime/probes.c
@@ -22,7 +22,7 @@ void _stp_unregister_jprobes (struct jprobe *probes, int num_probes)
int i;
for (i = 0; i < num_probes; i++)
unregister_jprobe(&probes[i]);
- _stp_log ("All jprobes removed\n");
+ dbug("All jprobes removed\n");
}
/** Register a group of jprobes.
@@ -39,12 +39,11 @@ int _stp_register_jprobes (struct jprobe *probes, int num_probes)
for (i = 0; i < num_probes; i++) {
addr =_stp_lookup_name((char *)probes[i].kp.addr);
if (addr == 0) {
- _stp_log ("ERROR: function %s not found!\n",
- (char *)probes[i].kp.addr);
+ _stp_warn("function %s not found!\n", (char *)probes[i].kp.addr);
ret = -1; /* FIXME */
goto out;
}
- _stp_log("inserting jprobe at %s (%p)\n", probes[i].kp.addr, addr);
+ dbug("inserting jprobe at %s (%p)\n", probes[i].kp.addr, addr);
probes[i].kp.addr = (kprobe_opcode_t *)addr;
ret = register_jprobe(&probes[i]);
if (ret)
@@ -52,7 +51,7 @@ int _stp_register_jprobes (struct jprobe *probes, int num_probes)
}
return 0;
out:
- _stp_log ("probe module initialization failed. Exiting...\n");
+ _stp_warn("probe module initialization failed. Exiting...\n");
_stp_unregister_jprobes(probes, i);
return ret;
}
@@ -67,7 +66,7 @@ void _stp_unregister_kprobes (struct kprobe *probes, int num_probes)
int i;
for (i = 0; i < num_probes; i++)
unregister_kprobe(&probes[i]);
- _stp_log ("All kprobes removed\n");
+ dbug("All kprobes removed\n");
}
@@ -81,7 +80,7 @@ void _stp_unregister_kretprobes (struct kretprobe *probes, int num_probes)
int i;
for (i = 0; i < num_probes; i++)
unregister_kretprobe(&probes[i]);
- _stp_log ("All kretprobes removed\n");
+ dbug("All return probes removed\n");
}
#endif
@@ -98,12 +97,11 @@ int _stp_register_kprobes (struct kprobe *probes, int num_probes)
for (i = 0; i < num_probes; i++) {
addr =_stp_lookup_name((char *)probes[i].addr);
if (addr == 0) {
- _stp_log ("ERROR: function %s not found!\n",
- (char *)probes[i].addr);
- ret = -1; /* FIXME */
+ _stp_warn("function %s not found!\n", (char *)probes[i].addr);
+ ret = -1;
goto out;
}
- _stp_log("inserting kprobe at %s (%p)\n", probes[i].addr, addr);
+ dbug("inserting kprobe at %s (%p)\n", probes[i].addr, addr);
probes[i].addr = (kprobe_opcode_t *)addr;
ret = register_kprobe(&probes[i]);
if (ret)
@@ -111,7 +109,7 @@ int _stp_register_kprobes (struct kprobe *probes, int num_probes)
}
return 0;
out:
- _stp_log ("probe module initialization failed. Exiting...\n");
+ _stp_warn("probe module initialization failed. Exiting...\n");
_stp_unregister_kprobes(probes, i);
return ret;
}
@@ -130,12 +128,12 @@ int _stp_register_kretprobes (struct kretprobe *probes, int num_probes)
for (i = 0; i < num_probes; i++) {
addr =_stp_lookup_name((char *)probes[i].kp.addr);
if (addr == 0) {
- _stp_log ("ERROR: function %s not found!\n",
- (char *)probes[i].kp.addr);
+ _stp_warn("function %s not found!\n",
+ (char *)probes[i].kp.addr);
ret = -1; /* FIXME */
goto out;
}
- _stp_log("inserting kretprobe at %s (%p)\n", probes[i].kp.addr, addr);
+ dbug("inserting kretprobe at %s (%p)\n", probes[i].kp.addr, addr);
probes[i].kp.addr = (kprobe_opcode_t *)addr;
ret = register_kretprobe(&probes[i]);
if (ret)
@@ -143,7 +141,7 @@ int _stp_register_kretprobes (struct kretprobe *probes, int num_probes)
}
return 0;
out:
- _stp_log ("probe module initialization failed. Exiting...\n");
+ _stp_warn("probe module initialization failed. Exiting...\n");
_stp_unregister_kretprobes(probes, i);
return ret;
}