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 */ |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 9 | }; |
| 10 | |
Christoph Hellwig | ab1b6f0 | 2007-05-08 00:23:29 -0700 | [diff] [blame] | 11 | extern void save_stack_trace(struct stack_trace *trace); |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 12 | |
| 13 | extern void print_stack_trace(struct stack_trace *trace, int spaces); |
| 14 | #else |
Christoph Hellwig | ab1b6f0 | 2007-05-08 00:23:29 -0700 | [diff] [blame] | 15 | # define save_stack_trace(trace) do { } while (0) |
Johannes Berg | 3b5ad07 | 2007-07-19 01:49:02 -0700 | [diff] [blame] | 16 | # define print_stack_trace(trace, spaces) do { } while (0) |
Ingo Molnar | 8637c09 | 2006-07-03 00:24:38 -0700 | [diff] [blame] | 17 | #endif |
| 18 | |
| 19 | #endif |