]> sourceware.org Git - systemtap.git/commitdiff
2005-10-19 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Wed, 19 Oct 2005 21:04:34 +0000 (21:04 +0000)
committerhunt <hunt>
Wed, 19 Oct 2005 21:04:34 +0000 (21:04 +0000)
* runtime.h (_stp_kallsyms_lookup_tabled): Only
compile this for systemtap. Runtime-only examples
don't need it.

runtime/ChangeLog
runtime/runtime.h

index c01b69d671128a5c996d2ef574c0890e734b68a2..be02002b63714e78368fc1529e70120a4901b520 100644 (file)
@@ -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.
index bcee85d54fbb48660c9e264be444187072e9213b..e077c29a7573c81701c67cbde5fe3b3d67d69a9a 100644 (file)
@@ -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");
 
This page took 0.033301 seconds and 5 git commands to generate.