Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[deliverable/linux.git] / include / linux / stacktrace.h
CommitLineData
8637c099
IM
1#ifndef __LINUX_STACKTRACE_H
2#define __LINUX_STACKTRACE_H
3
9a92a6ce
JK
4#include <linux/types.h>
5
897312bd 6struct task_struct;
9c0729dc 7struct pt_regs;
897312bd 8
8637c099 9#ifdef CONFIG_STACKTRACE
b618ad31
VN
10struct task_struct;
11
8637c099
IM
12struct stack_trace {
13 unsigned int nr_entries, max_entries;
14 unsigned long *entries;
5a1b3999 15 int skip; /* input argument: How many entries to skip */
8637c099
IM
16};
17
ab1b6f03 18extern void save_stack_trace(struct stack_trace *trace);
39581062
MH
19extern void save_stack_trace_regs(struct pt_regs *regs,
20 struct stack_trace *trace);
9745512c
AV
21extern void save_stack_trace_tsk(struct task_struct *tsk,
22 struct stack_trace *trace);
8637c099
IM
23
24extern void print_stack_trace(struct stack_trace *trace, int spaces);
9a92a6ce
JK
25extern int snprint_stack_trace(char *buf, size_t size,
26 struct stack_trace *trace, int spaces);
02b67518 27
8d26487f 28#ifdef CONFIG_USER_STACKTRACE_SUPPORT
02b67518
TE
29extern void save_stack_trace_user(struct stack_trace *trace);
30#else
31# define save_stack_trace_user(trace) do { } while (0)
32#endif
33
8637c099 34#else
ab1b6f03 35# define save_stack_trace(trace) do { } while (0)
9745512c 36# define save_stack_trace_tsk(tsk, trace) do { } while (0)
8d7c6a96 37# define save_stack_trace_user(trace) do { } while (0)
3b5ad079 38# define print_stack_trace(trace, spaces) do { } while (0)
9a92a6ce 39# define snprint_stack_trace(buf, size, trace, spaces) do { } while (0)
8637c099
IM
40#endif
41
42#endif
This page took 1.057852 seconds and 5 git commands to generate.