summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-02-18 19:33:06 -0500
committerFrank Ch. Eigler <fche@elastic.org>2009-02-18 19:33:24 -0500
commit8aaa6e11f666ad372107299b5b17602011125c7d (patch)
tree984049f5969bb6dd5d913993512d002e0357cad2
parent84212c8c04060f916c50a60651174bdbc727dc7d (diff)
downloadsystemtap-steved-8aaa6e11f666ad372107299b5b17602011125c7d.tar.gz
systemtap-steved-8aaa6e11f666ad372107299b5b17602011125c7d.tar.xz
systemtap-steved-8aaa6e11f666ad372107299b5b17602011125c7d.zip
PR9866 band-aid: deactivate new CONFIG_STACKTRACE code for older kernels
-rw-r--r--runtime/ChangeLog6
-rw-r--r--runtime/stack-i386.c2
-rw-r--r--runtime/stack-x86_64.c2
-rw-r--r--runtime/stack.c7
4 files changed, 12 insertions, 5 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 13f17ab1..cd0c6e35 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-18 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 9866 band-aid.
+ * stack.c, stack-i386.c, stack-x86_64.c (CONFIG_STACKTRACE):
+ Also make conditional on KERNEL_VERSION > 2.6.26.
+
2009-02-18 Will Cohen <wcohen@redhat.com>
PR 9860
diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c
index 3c3921ea..206801d8 100644
--- a/runtime/stack-i386.c
+++ b/runtime/stack-i386.c
@@ -14,7 +14,7 @@ static int _stp_valid_stack_ptr(unsigned long context, unsigned long p)
}
/* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */
-#ifndef CONFIG_STACKTRACE
+#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels)
{
unsigned long addr;
diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c
index 060f370d..183de0a0 100644
--- a/runtime/stack-x86_64.c
+++ b/runtime/stack-x86_64.c
@@ -10,7 +10,7 @@
/* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */
-#ifndef CONFIG_STACKTRACE
+#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels)
{
unsigned long addr;
diff --git a/runtime/stack.c b/runtime/stack.c
index 2a133398..aa0e6d65 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -27,7 +27,8 @@
#define MAXBACKTRACE 20
-#ifdef CONFIG_STACKTRACE
+#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+// XXX: PR9866: hacky temporarily restriction to recent kernels
#include <linux/stacktrace.h>
#include <asm/stacktrace.h>
#endif
@@ -50,7 +51,7 @@ static void _stp_stack_print_fallback(unsigned long, int, int);
#error "Unsupported architecture"
#endif
-#ifdef CONFIG_STACKTRACE
+#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
struct print_stack_data
{
@@ -160,7 +161,7 @@ static void _stp_ustack_print(char *str)
void _stp_stack_print_tsk(struct task_struct *tsk, int verbose, int levels)
{
-#ifdef CONFIG_STACKTRACE
+#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
int i;
unsigned long backtrace[MAXBACKTRACE];
struct stack_trace trace;