+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.
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,
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");