summaryrefslogtreecommitdiffstats
path: root/runtime/stack.c
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-03-04 11:56:45 +0100
committerTim Moore <timoore@redhat.com>2009-03-04 13:18:55 +0100
commit8c5905d0b6c8206c5ed971a637077aa8ef5c1b02 (patch)
tree12e9d4f80aec601b66ec83e06e8b3675ba4a18bd /runtime/stack.c
parentcd1db1dd034141535648a66d9896db6c5e74dd9e (diff)
downloadsystemtap-steved-8c5905d0b6c8206c5ed971a637077aa8ef5c1b02.tar.gz
systemtap-steved-8c5905d0b6c8206c5ed971a637077aa8ef5c1b02.tar.xz
systemtap-steved-8c5905d0b6c8206c5ed971a637077aa8ef5c1b02.zip
stap autoconf test for kernel stack trace support
* buildrun.cxx (compile_pass): Add autoconf line for stack trace test, which defines STAPCONF_KERNEL_STACKTRACE. * runtime/autoconf-save-stack-trace.c: New file. * runtime/stack.c : Use STAPCONF_KERNEL_STACKTRACE instead of tests for kernel configuration and versions. * runtime/stack-i386.c : ditto * runtime/stack-x86_64.c : ditto
Diffstat (limited to 'runtime/stack.c')
-rw-r--r--runtime/stack.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/stack.c b/runtime/stack.c
index aa0e6d65..f6b1cd08 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -27,8 +27,7 @@
#define MAXBACKTRACE 20
-#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
-// XXX: PR9866: hacky temporarily restriction to recent kernels
+#if defined(STAPCONF_KERNEL_STACKTRACE)
#include <linux/stacktrace.h>
#include <asm/stacktrace.h>
#endif
@@ -51,7 +50,7 @@ static void _stp_stack_print_fallback(unsigned long, int, int);
#error "Unsupported architecture"
#endif
-#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+#if defined(STAPCONF_KERNEL_STACKTRACE)
struct print_stack_data
{
@@ -161,7 +160,7 @@ static void _stp_ustack_print(char *str)
void _stp_stack_print_tsk(struct task_struct *tsk, int verbose, int levels)
{
-#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+#if defined(STAPCONF_KERNEL_STACKTRACE)
int i;
unsigned long backtrace[MAXBACKTRACE];
struct stack_trace trace;