x86: add save_stack_trace_bp() for tracing from a specific stack frame
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / stacktrace.h
CommitLineData
8637c099
IM
1#ifndef __LINUX_STACKTRACE_H
2#define __LINUX_STACKTRACE_H
3
897312bd
AM
4struct task_struct;
5
8637c099
IM
6#ifdef CONFIG_STACKTRACE
7struct stack_trace {
8 unsigned int nr_entries, max_entries;
9 unsigned long *entries;
5a1b3999 10 int skip; /* input argument: How many entries to skip */
8637c099
IM
11};
12
ab1b6f03 13extern void save_stack_trace(struct stack_trace *trace);
acc6be54 14extern void save_stack_trace_bp(struct stack_trace *trace, unsigned long bp);
9745512c
AV
15extern void save_stack_trace_tsk(struct task_struct *tsk,
16 struct stack_trace *trace);
8637c099
IM
17
18extern void print_stack_trace(struct stack_trace *trace, int spaces);
02b67518 19
8d26487f 20#ifdef CONFIG_USER_STACKTRACE_SUPPORT
02b67518
TE
21extern void save_stack_trace_user(struct stack_trace *trace);
22#else
23# define save_stack_trace_user(trace) do { } while (0)
24#endif
25
8637c099 26#else
ab1b6f03 27# define save_stack_trace(trace) do { } while (0)
9745512c 28# define save_stack_trace_tsk(tsk, trace) do { } while (0)
8d7c6a96 29# define save_stack_trace_user(trace) do { } while (0)
3b5ad079 30# define print_stack_trace(trace, spaces) do { } while (0)
8637c099
IM
31#endif
32
33#endif