From bbc46bf643491173b9086907cf0820b3fd2c1fe3 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 2 Feb 2009 15:58:53 +0100 Subject: Use kernel stack backtrace support when available Define new functions that use the kernel support to do a backtrace of other tasks than current. --- runtime/stack-x86_64.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/stack-x86_64.c') diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index d3ec91cf..060f370d 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -9,6 +9,8 @@ */ /* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */ + +#ifndef CONFIG_STACKTRACE static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels) { unsigned long addr; @@ -22,6 +24,8 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve stack++; } } +#endif + static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) { @@ -48,3 +52,5 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) _stp_stack_print_fallback(REG_SP(regs), verbose, levels); #endif } + + -- cgit From 8aaa6e11f666ad372107299b5b17602011125c7d Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 18 Feb 2009 19:33:06 -0500 Subject: PR9866 band-aid: deactivate new CONFIG_STACKTRACE code for older kernels --- runtime/stack-x86_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/stack-x86_64.c') 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; -- cgit