This source file includes following definitions.
- stack_trace_save_tsk_reliable
1
2 #ifndef __LINUX_STACKTRACE_H
3 #define __LINUX_STACKTRACE_H
4
5 #include <linux/types.h>
6 #include <asm/errno.h>
7
8 struct task_struct;
9 struct pt_regs;
10
11 #ifdef CONFIG_STACKTRACE
12 void stack_trace_print(const unsigned long *trace, unsigned int nr_entries,
13 int spaces);
14 int stack_trace_snprint(char *buf, size_t size, const unsigned long *entries,
15 unsigned int nr_entries, int spaces);
16 unsigned int stack_trace_save(unsigned long *store, unsigned int size,
17 unsigned int skipnr);
18 unsigned int stack_trace_save_tsk(struct task_struct *task,
19 unsigned long *store, unsigned int size,
20 unsigned int skipnr);
21 unsigned int stack_trace_save_regs(struct pt_regs *regs, unsigned long *store,
22 unsigned int size, unsigned int skipnr);
23 unsigned int stack_trace_save_user(unsigned long *store, unsigned int size);
24
25
26 #ifdef CONFIG_ARCH_STACKWALK
27
28
29
30
31
32
33
34
35
36
37
38 typedef bool (*stack_trace_consume_fn)(void *cookie, unsigned long addr,
39 bool reliable);
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie,
57 struct task_struct *task, struct pt_regs *regs);
58 int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry, void *cookie,
59 struct task_struct *task);
60 void arch_stack_walk_user(stack_trace_consume_fn consume_entry, void *cookie,
61 const struct pt_regs *regs);
62
63 #else
64 struct stack_trace {
65 unsigned int nr_entries, max_entries;
66 unsigned long *entries;
67 int skip;
68 };
69
70 extern void save_stack_trace(struct stack_trace *trace);
71 extern void save_stack_trace_regs(struct pt_regs *regs,
72 struct stack_trace *trace);
73 extern void save_stack_trace_tsk(struct task_struct *tsk,
74 struct stack_trace *trace);
75 extern int save_stack_trace_tsk_reliable(struct task_struct *tsk,
76 struct stack_trace *trace);
77 extern void save_stack_trace_user(struct stack_trace *trace);
78 #endif
79 #endif
80
81 #if defined(CONFIG_STACKTRACE) && defined(CONFIG_HAVE_RELIABLE_STACKTRACE)
82 int stack_trace_save_tsk_reliable(struct task_struct *tsk, unsigned long *store,
83 unsigned int size);
84 #else
85 static inline int stack_trace_save_tsk_reliable(struct task_struct *tsk,
86 unsigned long *store,
87 unsigned int size)
88 {
89 return -ENOSYS;
90 }
91 #endif
92
93 #endif