summaryrefslogtreecommitdiffstats
path: root/runtime/probes.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-08-31 18:24:26 +0000
committerhunt <hunt>2005-08-31 18:24:26 +0000
commit5a90d39d40a4360db4715408190aee558dbc3813 (patch)
tree36181c4b49e9ea92bf37e2e5a1a6b2db669b47b0 /runtime/probes.c
parent9a062ac8db299aeea20f189dafa253875889abb8 (diff)
downloadsystemtap-steved-5a90d39d40a4360db4715408190aee558dbc3813.tar.gz
systemtap-steved-5a90d39d40a4360db4715408190aee558dbc3813.tar.xz
systemtap-steved-5a90d39d40a4360db4715408190aee558dbc3813.zip
2005-08-31 Martin Hunt <hunt@redhat.com>
* sym.c (_stp_kallsyms_lookup): Moved to runtime.h. * stack.c (_stp_kta): Moved to runtime.h. * runtime.h (init_module): Initialize _stp_kallsyms_lookup and _stp_kta. * probes.c (_stp_lookup_name): Replaced by kallsyms_lookup_name().
Diffstat (limited to 'runtime/probes.c')
-rw-r--r--runtime/probes.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/runtime/probes.c b/runtime/probes.c
index bb410915..139d53aa 100644
--- a/runtime/probes.c
+++ b/runtime/probes.c
@@ -5,13 +5,6 @@
* @brief Functions to assist loading and unloading groups of probes.
*/
-/** Lookup name.
- * This simply calls the kernel function kallsyms_lookup_name().
- * That function is not exported, so this workaround is required.
- * See the kernel source, kernel/kallsyms.c for more information.
- */
-static unsigned long (*_stp_lookup_name)(char *name)=(void *)KALLSYMS_LOOKUP_NAME;
-
/** Unregister a group of jprobes.
* @param probes Pointer to an array of struct jprobe.
* @param num_probes Number of probes in the array.
@@ -37,7 +30,7 @@ int _stp_register_jprobes (struct jprobe *probes, int num_probes)
unsigned long addr;
for (i = 0; i < num_probes; i++) {
- addr =_stp_lookup_name((char *)probes[i].kp.addr);
+ addr =kallsyms_lookup_name((char *)probes[i].kp.addr);
if (addr == 0) {
_stp_warn("function %s not found!\n", (char *)probes[i].kp.addr);
ret = -1; /* FIXME */
@@ -95,7 +88,7 @@ int _stp_register_kprobes (struct kprobe *probes, int num_probes)
unsigned long addr;
for (i = 0; i < num_probes; i++) {
- addr =_stp_lookup_name((char *)probes[i].addr);
+ addr = kallsyms_lookup_name((char *)probes[i].addr);
if (addr == 0) {
_stp_warn("function %s not found!\n", (char *)probes[i].addr);
ret = -1;
@@ -126,7 +119,7 @@ int _stp_register_kretprobes (struct kretprobe *probes, int num_probes)
unsigned long addr;
for (i = 0; i < num_probes; i++) {
- addr =_stp_lookup_name((char *)probes[i].kp.addr);
+ addr = kallsyms_lookup_name((char *)probes[i].kp.addr);
if (addr == 0) {
_stp_warn("function %s not found!\n",
(char *)probes[i].kp.addr);