The SH implementation never called stacktrace_ops.stack(). Presumably this was copied from the x86 implementation. Hence remove the method, and all implementations (most of them are dummies).
Unified · Split
| @@ -12,8 +12,6 @@ · 11 unmodified lines | ||
| 12 | 12 | |
| 13 | 13 | struct stacktrace_ops { |
| 14 | 14 | void (*address)(void *data, unsigned long address, int reliable); |
| 15 | − /* On negative return stop dumping */ | |
| 16 | − int (*stack)(void *data, char *name); | |
| 17 | 15 | }; |
| 18 | 16 | |
| 19 | 17 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, |
| @@ -107,12 +107,6 @@ stack_reader_dump(struct task_struct *task, struct pt_regs *regs, · 106 unmodified lines | ||
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | −static int print_trace_stack(void *data, char *name) | |
| 111 | −{ | |
| 112 | − printk("%s <%s> ", (char *)data, name); | |
| 113 | − return 0; | |
| 114 | −} | |
| 115 | − | |
| 116 | 110 | /* |
| 117 | 111 | * Print one address/symbol entries per line. |
| 118 | 112 | */ |
| @@ -123,7 +117,6 @@ static void print_trace_address(void *data, unsigned long addr, int reliable) · 4 unmodified lines | ||
| 123 | 117 | } |
| 124 | 118 | |
| 125 | 119 | static const struct stacktrace_ops print_trace_ops = { |
| 126 | − .stack = print_trace_stack, | |
| 127 | 120 | .address = print_trace_address, |
| 128 | 121 | }; |
| 129 | 122 | |
| @@ -11,11 +11,6 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <asm/unwinder.h> |
| 12 | 12 | #include <asm/ptrace.h> |
| 13 | 13 | |
| 14 | −static int callchain_stack(void *data, char *name) | |
| 15 | −{ | |
| 16 | − return 0; | |
| 17 | −} | |
| 18 | − | |
| 19 | 14 | static void callchain_address(void *data, unsigned long addr, int reliable) |
| 20 | 15 | { |
| 21 | 16 | struct perf_callchain_entry_ctx *entry = data; |
| @@ -25,7 +20,6 @@ static void callchain_address(void *data, unsigned long addr, int reliable) · 3 unmodified lines | ||
| 25 | 20 | } |
| 26 | 21 | |
| 27 | 22 | static const struct stacktrace_ops callchain_ops = { |
| 28 | − .stack = callchain_stack, | |
| 29 | 23 | .address = callchain_address, |
| 30 | 24 | }; |
| 31 | 25 | |
| @@ -15,11 +15,6 @@ · 14 unmodified lines | ||
| 15 | 15 | #include <asm/ptrace.h> |
| 16 | 16 | #include <asm/stacktrace.h> |
| 17 | 17 | |
| 18 | −static int save_stack_stack(void *data, char *name) | |
| 19 | −{ | |
| 20 | − return 0; | |
| 21 | −} | |
| 22 | − | |
| 23 | 18 | /* |
| 24 | 19 | * Save stack-backtrace addresses into a stack_trace buffer. |
| 25 | 20 | */ |
| @@ -40,7 +35,6 @@ static void save_stack_address(void *data, unsigned long addr, int reliable) · 14 unmodified lines | ||
| 40 | 35 | } |
| 41 | 36 | |
| 42 | 37 | static const struct stacktrace_ops save_stack_ops = { |
| 43 | − .stack = save_stack_stack, | |
| 44 | 38 | .address = save_stack_address, |
| 45 | 39 | }; |
| 46 | 40 | |
| @@ -73,7 +67,6 @@ save_stack_address_nosched(void *data, unsigned long addr, int reliable) · 26 unmodified lines | ||
| 73 | 67 | } |
| 74 | 68 | |
| 75 | 69 | static const struct stacktrace_ops save_stack_ops_nosched = { |
| 76 | − .stack = save_stack_stack, | |
| 77 | 70 | .address = save_stack_address_nosched, |
| 78 | 71 | }; |
| 79 | 72 | |
| @@ -19,12 +19,6 @@ · 18 unmodified lines | ||
| 19 | 19 | #include <asm/sections.h> |
| 20 | 20 | #include <asm/stacktrace.h> |
| 21 | 21 | |
| 22 | −static int backtrace_stack(void *data, char *name) | |
| 23 | −{ | |
| 24 | − /* Yes, we want all stacks */ | |
| 25 | − return 0; | |
| 26 | −} | |
| 27 | − | |
| 28 | 22 | static void backtrace_address(void *data, unsigned long addr, int reliable) |
| 29 | 23 | { |
| 30 | 24 | unsigned int *depth = data; |
| @@ -34,7 +28,6 @@ static void backtrace_address(void *data, unsigned long addr, int reliable) · 3 unmodified lines | ||
| 34 | 28 | } |
| 35 | 29 | |
| 36 | 30 | static struct stacktrace_ops backtrace_ops = { |
| 37 | − .stack = backtrace_stack, | |
| 38 | 31 | .address = backtrace_address, |
| 39 | 32 | }; |
| 40 | 33 | |