diff options
author | hien <hien> | 2005-11-02 18:51:09 +0000 |
---|---|---|
committer | hien <hien> | 2005-11-02 18:51:09 +0000 |
commit | 3c9dd85f7066ec8fe086c83c40ec4d4f70fd2128 (patch) | |
tree | 0bfb28ff1ab56724169851e858834c0b8c3b8bfc /runtime/runtime.h | |
parent | 6a39967c35b015aad42f7b7f733e46ebe7869120 (diff) | |
download | systemtap-steved-3c9dd85f7066ec8fe086c83c40ec4d4f70fd2128.tar.gz systemtap-steved-3c9dd85f7066ec8fe086c83c40ec4d4f70fd2128.tar.xz systemtap-steved-3c9dd85f7066ec8fe086c83c40ec4d4f70fd2128.zip |
Added ppc64 _stp_stack_print
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index fba6f153..f226358f 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -71,6 +71,10 @@ static const char * (*_stp_kallsyms_lookup)(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf); +#if defined (__powerpc64__) +static int (*_stp_validate_sp)(unsigned long sp, struct task_struct *p, + unsigned long nbytes); +#endif /* TEST_MODE is always defined by systemtap */ #ifdef TEST_MODE @@ -132,8 +136,21 @@ static const char * _stp_kallsyms_lookup_tabled (unsigned long addr, #endif int init_module (void) { +/* + * In order for the kallsyms_lookup_name hack to work under ppc64, we need + * CONFIG_KALLSYMS_ALL=y. + * On ppc64 the kallsyms_lookup_name(.funcname) returns the function entry, + * but kallsyms_lookup_name(funcname) returns the function descriptor + * (func_descr_t). The latter is what we want, and those symbols are only + * available with CONFIG_KALLSYMS_ALL=y. + */ _stp_kta = (int (*)(unsigned long))kallsyms_lookup_name("__kernel_text_address"); +#if defined (__powerpc64__) +_stp_validate_sp = (int (*)(unsigned long, struct task_struct *, + unsigned long)) kallsyms_lookup_name("validate_sp"); +#endif + #ifdef SYSTEMTAP if (stap_num_symbols > 0) _stp_kallsyms_lookup = & _stp_kallsyms_lookup_tabled; |