Root/
1 | /* |
2 | * kernel/stacktrace.c |
3 | * |
4 | * Stack trace management functions |
5 | * |
6 | * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
7 | */ |
8 | #include <linux/sched.h> |
9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> |
11 | #include <linux/kallsyms.h> |
12 | #include <linux/stacktrace.h> |
13 | |
14 | void print_stack_trace(struct stack_trace *trace, int spaces) |
15 | { |
16 | int i; |
17 | |
18 | if (WARN_ON(!trace->entries)) |
19 | return; |
20 | |
21 | for (i = 0; i < trace->nr_entries; i++) { |
22 | printk("%*c", 1 + spaces, ' '); |
23 | print_ip_sym(trace->entries[i]); |
24 | } |
25 | } |
26 | EXPORT_SYMBOL_GPL(print_stack_trace); |
27 | |
28 | /* |
29 | * Architectures that do not implement save_stack_trace_tsk or |
30 | * save_stack_trace_regs get this weak alias and a once-per-bootup warning |
31 | * (whenever this facility is utilized - for example by procfs): |
32 | */ |
33 | __weak void |
34 | save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) |
35 | { |
36 | WARN_ONCE(1, KERN_INFO "save_stack_trace_tsk() not implemented yet.\n"); |
37 | } |
38 | |
39 | __weak void |
40 | save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace) |
41 | { |
42 | WARN_ONCE(1, KERN_INFO "save_stack_trace_regs() not implemented yet.\n"); |
43 | } |
44 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9