diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-04-09 18:20:32 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-04-09 18:20:32 +0200 |
commit | 52356a26e1825acbd9146337ffdbed9b0e173f2b (patch) | |
tree | 8695fd0ac90e989470abc2f117f54245ff03437e /runtime/stack.c | |
parent | 18ac9f367a2e63335dfbdc8f5e8a97de4e40dbe4 (diff) | |
download | systemtap-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).
Diffstat (limited to 'runtime/stack.c')
-rw-r--r-- | runtime/stack.c | 8 |
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, |