summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-09 18:20:32 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-09 18:20:32 +0200
commit52356a26e1825acbd9146337ffdbed9b0e173f2b (patch)
tree8695fd0ac90e989470abc2f117f54245ff03437e
parent18ac9f367a2e63335dfbdc8f5e8a97de4e40dbe4 (diff)
downloadsystemtap-steved-52356a26e1825acbd9146337ffdbed9b0e173f2b.tar.gz
systemtap-steved-52356a26e1825acbd9146337ffdbed9b0e173f2b.tar.xz
systemtap-steved-52356a26e1825acbd9146337ffdbed9b0e173f2b.zip
Make simple probes work even without KPROBES in the kernel.
Without KPROBES very little works atm. But stack.c file is unconditionally imported, while these two functions are only used through context-unwind.stp. This at least lets us do simple sanity checks on "plain" kernels. * runtime/stack.c (_stp_stack_print, _stp_stack_snprint): Wrap in #if defined (CONFIG_KPROBES).
-rw-r--r--runtime/stack.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/stack.c b/runtime/stack.c
index f6b1cd08..68fb9b1f 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -97,6 +97,12 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve
&print_data);
}
#endif
+
+// Without KPROBES very little works atm.
+// But this file is unconditionally imported, while these two functions are only
+// used through context-unwind.stp.
+#if defined (CONFIG_KPROBES)
+
/** Prints the stack backtrace
* @param regs A pointer to the struct pt_regs.
*/
@@ -141,6 +147,8 @@ static void _stp_stack_snprint(char *str, int size, struct pt_regs *regs, int ve
pb->len = 0;
}
+#endif /* CONFIG_KPROBES */
+
/** Prints the user stack backtrace
* @param str string
* @returns Same string as was input with trace info appended,