blob: 5da9794b2d782d27f3f77fde3418521a6a19a3e8 [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);
Arjan van de Ven97455122008-01-25 21:08:34 +010012extern void save_stack_trace_tsk(struct task_struct *tsk,
13 struct stack_trace *trace);
Ingo Molnar8637c092006-07-03 00:24:38 -070014
15extern void print_stack_trace(struct stack_trace *trace, int spaces);
16#else
Christoph Hellwigab1b6f02007-05-08 00:23:29 -070017# define save_stack_trace(trace) do { } while (0)
Arjan van de Ven97455122008-01-25 21:08:34 +010018# define save_stack_trace_tsk(tsk, trace) do { } while (0)
Johannes Berg3b5ad072007-07-19 01:49:02 -070019# define print_stack_trace(trace, spaces) do { } while (0)
Ingo Molnar8637c092006-07-03 00:24:38 -070020#endif
21
22#endif