stacktrace.h 894 字节
Newer Older
1 2 3
#ifndef __LINUX_STACKTRACE_H
#define __LINUX_STACKTRACE_H

4 5
struct task_struct;

6 7 8 9
#ifdef CONFIG_STACKTRACE
struct stack_trace {
	unsigned int nr_entries, max_entries;
	unsigned long *entries;
10
	int skip;	/* input argument: How many entries to skip */
11 12
};

C
Christoph Hellwig 已提交
13
extern void save_stack_trace(struct stack_trace *trace);
A
Arjan van de Ven 已提交
14 15
extern void save_stack_trace_tsk(struct task_struct *tsk,
				struct stack_trace *trace);
16 17

extern void print_stack_trace(struct stack_trace *trace, int spaces);
18 19 20 21 22 23 24

#ifdef CONFIG_X86
extern void save_stack_trace_user(struct stack_trace *trace);
#else
# define save_stack_trace_user(trace)              do { } while (0)
#endif

25
#else
C
Christoph Hellwig 已提交
26
# define save_stack_trace(trace)			do { } while (0)
A
Arjan van de Ven 已提交
27
# define save_stack_trace_tsk(tsk, trace)		do { } while (0)
28
# define save_stack_trace_user(trace)              do { } while (0)
29
# define print_stack_trace(trace, spaces)		do { } while (0)
30 31 32
#endif

#endif