summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
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/runtime.h
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/runtime.h')
-rw-r--r--runtime/runtime.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 5e77505b..6189a92c 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -61,11 +61,19 @@ static struct
#include "arith.c"
#include "copy.c"
+static int (*_stp_kta)(unsigned long addr);
+static const char * (*_stp_kallsyms_lookup)(unsigned long addr,
+ unsigned long *symbolsize,
+ unsigned long *offset,
+ char **modname, char *namebuf);
+
/************* Module Stuff ********************/
int probe_start(void);
int init_module (void)
{
+ _stp_kta = (int (*)(unsigned long))kallsyms_lookup_name("__kernel_text_address");
+ _stp_kallsyms_lookup = (const char * (*)())kallsyms_lookup_name("kallsyms_lookup");
return _stp_transport_init();
}