diff options
author | hunt <hunt> | 2005-10-19 21:04:34 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-10-19 21:04:34 +0000 |
commit | f6f492468e2dfec286e3611e3e38ad070c91ae9d (patch) | |
tree | 647507d998d07f069bf5fc4bb1dc121c6023d507 | |
parent | 08c68653dd3dc7921339dfe4627c464ef4249faa (diff) | |
download | systemtap-steved-f6f492468e2dfec286e3611e3e38ad070c91ae9d.tar.gz systemtap-steved-f6f492468e2dfec286e3611e3e38ad070c91ae9d.tar.xz systemtap-steved-f6f492468e2dfec286e3611e3e38ad070c91ae9d.zip |
2005-10-19 Martin Hunt <hunt@redhat.com>
* runtime.h (_stp_kallsyms_lookup_tabled): Only
compile this for systemtap. Runtime-only examples
don't need it.
-rw-r--r-- | runtime/ChangeLog | 6 | ||||
-rw-r--r-- | runtime/runtime.h | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index c01b69d6..be02002b 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,9 @@ +2005-10-19 Martin Hunt <hunt@redhat.com> + + * runtime.h (_stp_kallsyms_lookup_tabled): Only + compile this for systemtap. Runtime-only examples + don't need it. + 2005-10-19 Tom Zanussi <zanussi@us.ibm.com> * print.c (_stp_print_flush): Switch to binary TIMESTAMP. diff --git a/runtime/runtime.h b/runtime/runtime.h index bcee85d5..e077c29a 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -70,7 +70,12 @@ static const char * (*_stp_kallsyms_lookup)(unsigned long addr, unsigned long *offset, char **modname, char *namebuf); +/* TEST_MODE is always defined by systemtap */ +#ifdef TEST_MODE +#define SYSTEMTAP 1 +#endif +#ifdef SYSTEMTAP /* This implementation is used if stap_[num_]symbols are available. */ static const char * _stp_kallsyms_lookup_tabled (unsigned long addr, unsigned long *symbolsize, @@ -118,16 +123,17 @@ static const char * _stp_kallsyms_lookup_tabled (unsigned long addr, return s->symbol; } } - - +#endif int init_module (void) { _stp_kta = (int (*)(unsigned long))kallsyms_lookup_name("__kernel_text_address"); +#ifdef SYSTEMTAP if (stap_num_symbols > 0) _stp_kallsyms_lookup = & _stp_kallsyms_lookup_tabled; else +#endif _stp_kallsyms_lookup = (const char * (*)(unsigned long,unsigned long *,unsigned long *,char **,char *)) kallsyms_lookup_name("kallsyms_lookup"); |