4 * @remark Copyright 2008 Tensilica Inc.
5 * Copyright (C) 2015 Cadence Design Systems Inc.
6 * @remark Read the file COPYING
10 #include <linux/oprofile.h>
11 #include <asm/ptrace.h>
12 #include <asm/stacktrace.h>
14 static int xtensa_backtrace_cb(struct stackframe *frame, void *data)
16 oprofile_add_trace(frame->pc);
20 void xtensa_backtrace(struct pt_regs * const regs, unsigned int depth)
23 xtensa_backtrace_user(regs, depth, xtensa_backtrace_cb, NULL);
25 xtensa_backtrace_kernel(regs, depth, xtensa_backtrace_cb,
26 xtensa_backtrace_cb, NULL);