This source file includes following definitions.
- xtensa_backtrace_cb
- xtensa_backtrace
1
2
3
4
5
6
7
8
9
10 #include <linux/oprofile.h>
11 #include <asm/ptrace.h>
12 #include <asm/stacktrace.h>
13
14 static int xtensa_backtrace_cb(struct stackframe *frame, void *data)
15 {
16 oprofile_add_trace(frame->pc);
17 return 0;
18 }
19
20 void xtensa_backtrace(struct pt_regs * const regs, unsigned int depth)
21 {
22 if (user_mode(regs))
23 xtensa_backtrace_user(regs, depth, xtensa_backtrace_cb, NULL);
24 else
25 xtensa_backtrace_kernel(regs, depth, xtensa_backtrace_cb,
26 xtensa_backtrace_cb, NULL);
27 }