2 * arch/ia64/kernel/stacktrace.c
4 * Stack trace management functions
7 #include <linux/sched.h>
8 #include <linux/stacktrace.h>
9 #include <linux/module.h>
12 ia64_do_save_stack(struct unw_frame_info
*info
, void *arg
)
14 struct stack_trace
*trace
= arg
;
16 int skip
= trace
->skip
;
18 trace
->nr_entries
= 0;
20 unw_get_ip(info
, &ip
);
24 trace
->entries
[trace
->nr_entries
++] = ip
;
25 if (trace
->nr_entries
== trace
->max_entries
)
29 } while (unw_unwind(info
) >= 0);
33 * Save stack-backtrace addresses into a stack_trace buffer.
35 void save_stack_trace(struct stack_trace
*trace
)
37 unw_init_running(ia64_do_save_stack
, trace
);
39 EXPORT_SYMBOL(save_stack_trace
);