blob: 50e2b01e517cc3c9bdf3af4b328c4afb8d3aab21 [file] [log] [blame]
Ingo Molnar8637c092006-07-03 00:24:38 -07001#ifndef __LINUX_STACKTRACE_H
2#define __LINUX_STACKTRACE_H
3
4#ifdef CONFIG_STACKTRACE
5struct stack_trace {
6 unsigned int nr_entries, max_entries;
7 unsigned long *entries;
Andi Kleen5a1b3992006-09-26 10:52:34 +02008 int skip; /* input argument: How many entries to skip */
9 int all_contexts; /* input argument: if true do than one stack */
Ingo Molnar8637c092006-07-03 00:24:38 -070010};
11
12extern void save_stack_trace(struct stack_trace *trace,
Andi Kleen5a1b3992006-09-26 10:52:34 +020013 struct task_struct *task);
Ingo Molnar8637c092006-07-03 00:24:38 -070014
15extern void print_stack_trace(struct stack_trace *trace, int spaces);
16#else
Andi Kleen5a1b3992006-09-26 10:52:34 +020017# define save_stack_trace(trace, task) do { } while (0)
Ingo Molnar8637c092006-07-03 00:24:38 -070018# define print_stack_trace(trace) do { } while (0)
19#endif
20
21#endif