blob: e7fa657d0c4940c6300a9ce4e516b73f765e31f3 [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 */
Ingo Molnar8637c092006-07-03 00:24:38 -07009};
10
Christoph Hellwigab1b6f02007-05-08 00:23:29 -070011extern void save_stack_trace(struct stack_trace *trace);
Ingo Molnar8637c092006-07-03 00:24:38 -070012
13extern void print_stack_trace(struct stack_trace *trace, int spaces);
14#else
Christoph Hellwigab1b6f02007-05-08 00:23:29 -070015# define save_stack_trace(trace) do { } while (0)
Johannes Berg3b5ad072007-07-19 01:49:02 -070016# define print_stack_trace(trace, spaces) do { } while (0)
Ingo Molnar8637c092006-07-03 00:24:38 -070017#endif
18
19#endif