diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-25 05:37:07 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-25 05:37:07 -0400 |
| commit | 0e2f65ee30eee2db054f7fd73f462c5da33ec963 (patch) | |
| tree | 26c61eb7745da0c0d9135e9d12088f570cb8530d /kernel/stacktrace.c | |
| parent | da7878d75b8520c9ae00d27dfbbce546a7bfdfbb (diff) | |
| parent | fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 (diff) | |
Merge branch 'linus' into x86/pebs
Conflicts:
arch/x86/Kconfig.cpu
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/setup_64.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/stacktrace.c')
| -rw-r--r-- | kernel/stacktrace.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c index b71816e47a30..94b527ef1d1e 100644 --- a/kernel/stacktrace.c +++ b/kernel/stacktrace.c | |||
| @@ -6,19 +6,21 @@ | |||
| 6 | * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 6 | * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
| 7 | */ | 7 | */ |
| 8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
| 9 | #include <linux/module.h> | ||
| 9 | #include <linux/kallsyms.h> | 10 | #include <linux/kallsyms.h> |
| 10 | #include <linux/stacktrace.h> | 11 | #include <linux/stacktrace.h> |
| 11 | 12 | ||
| 12 | void print_stack_trace(struct stack_trace *trace, int spaces) | 13 | void print_stack_trace(struct stack_trace *trace, int spaces) |
| 13 | { | 14 | { |
| 14 | int i, j; | 15 | int i; |
| 15 | 16 | ||
| 16 | for (i = 0; i < trace->nr_entries; i++) { | 17 | if (WARN_ON(!trace->entries)) |
| 17 | unsigned long ip = trace->entries[i]; | 18 | return; |
| 18 | 19 | ||
| 19 | for (j = 0; j < spaces + 1; j++) | 20 | for (i = 0; i < trace->nr_entries; i++) { |
| 20 | printk(" "); | 21 | printk("%*c", 1 + spaces, ' '); |
| 21 | print_ip_sym(ip); | 22 | print_ip_sym(trace->entries[i]); |
| 22 | } | 23 | } |
| 23 | } | 24 | } |
| 25 | EXPORT_SYMBOL_GPL(print_stack_trace); | ||
| 24 | 26 | ||
