aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/stacktrace.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-05-08 03:23:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:14:58 -0400
commitab1b6f03a10ba1f5638188ab06bf46e33ac3a160 (patch)
tree2dc7ce01df5d51d81e250dd9cee1b7b04627466e /arch/x86_64/kernel/stacktrace.c
parent7e4c3690b07f04b1942c39db358a5c8a72831daa (diff)
simplify the stacktrace code
Simplify the stacktrace code: - remove the unused task argument to save_stack_trace, it's always current - remove the all_contexts flag, it's alwasy 0 Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andi Kleen <ak@suse.de> Cc: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel/stacktrace.c')
-rw-r--r--arch/x86_64/kernel/stacktrace.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/stacktrace.c b/arch/x86_64/kernel/stacktrace.c
index 65ac2c6b34a6..cb9109113584 100644
--- a/arch/x86_64/kernel/stacktrace.c
+++ b/arch/x86_64/kernel/stacktrace.c
@@ -21,8 +21,7 @@ save_stack_warning_symbol(void *data, char *msg, unsigned long symbol)
21 21
22static int save_stack_stack(void *data, char *name) 22static int save_stack_stack(void *data, char *name)
23{ 23{
24 struct stack_trace *trace = (struct stack_trace *)data; 24 return -1;
25 return trace->all_contexts ? 0 : -1;
26} 25}
27 26
28static void save_stack_address(void *data, unsigned long addr) 27static void save_stack_address(void *data, unsigned long addr)
@@ -46,11 +45,10 @@ static struct stacktrace_ops save_stack_ops = {
46/* 45/*
47 * Save stack-backtrace addresses into a stack_trace buffer. 46 * Save stack-backtrace addresses into a stack_trace buffer.
48 */ 47 */
49void save_stack_trace(struct stack_trace *trace, struct task_struct *task) 48void save_stack_trace(struct stack_trace *trace)
50{ 49{
51 dump_trace(task, NULL, NULL, &save_stack_ops, trace); 50 dump_trace(current, NULL, NULL, &save_stack_ops, trace);
52 if (trace->nr_entries < trace->max_entries) 51 if (trace->nr_entries < trace->max_entries)
53 trace->entries[trace->nr_entries++] = ULONG_MAX; 52 trace->entries[trace->nr_entries++] = ULONG_MAX;
54} 53}
55EXPORT_SYMBOL(save_stack_trace); 54EXPORT_SYMBOL(save_stack_trace);
56