1 #ifndef __LINUX_STACKTRACE_H 2 #define __LINUX_STACKTRACE_H 3 4 struct task_struct; 5 6 #ifdef CONFIG_STACKTRACE 7 struct stack_trace { 8 unsigned int nr_entries, max_entries; 9 unsigned long *entries; 10 int skip; /* input argument: How many entries to skip */ 11 }; 12 13 extern void save_stack_trace(struct stack_trace *trace); 14 extern void save_stack_trace_tsk(struct task_struct *tsk, 15 struct stack_trace *trace); 16 17 extern void print_stack_trace(struct stack_trace *trace, int spaces); 18 19 #ifdef CONFIG_USER_STACKTRACE_SUPPORT 20 extern void save_stack_trace_user(struct stack_trace *trace); 21 #else 22 # define save_stack_trace_user(trace) do { } while (0) 23 #endif 24 25 #else 26 # define save_stack_trace(trace) do { } while (0) 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 #endif 31 32 #endif 33