Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 1 | #ifndef __LINUX_STACKTRACE_H |
| 2 | #define __LINUX_STACKTRACE_H |
| 3 | |
| 4 | #ifdef CONFIG_STACKTRACE |
| 5 | struct stack_trace { |
| 6 | unsigned int nr_entries, max_entries; |
| 7 | unsigned long *entries; |
Andi Kleen | 5a1b399 | 2006-09-26 10:52:34 +0200 | [diff] [blame] | 8 | int skip; /* input argument: How many entries to skip */ |
| 9 | int all_contexts; /* input argument: if true do than one stack */ |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 10 | }; |
| 11 | |
| 12 | extern void save_stack_trace(struct stack_trace *trace, |
Andi Kleen | 5a1b399 | 2006-09-26 10:52:34 +0200 | [diff] [blame] | 13 | struct task_struct *task); |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 14 | |
| 15 | extern void print_stack_trace(struct stack_trace *trace, int spaces); |
| 16 | #else |
Andi Kleen | 5a1b399 | 2006-09-26 10:52:34 +0200 | [diff] [blame] | 17 | # define save_stack_trace(trace, task) do { } while (0) |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 18 | # define print_stack_trace(trace) do { } while (0) |
| 19 | #endif |
| 20 | |
| 21 | #endif |