16 #include <linux/perf_event.h>
18 #include <linux/slab.h>
19 #include <asm/stacktrace.h>
22 #include <asm/perf_event.h>
23 #include <asm/ptrace.h>
25 #ifdef CONFIG_HW_PERF_EVENTS
32 static struct op_perf_name {
35 } op_perf_name_map[] = {
36 {
"xscale1",
"arm/xscale1" },
37 {
"xscale1",
"arm/xscale2" },
38 {
"v6",
"arm/armv6" },
39 {
"v6mpcore",
"arm/mpcore" },
40 {
"ARMv7 Cortex-A8",
"arm/armv7" },
41 {
"ARMv7 Cortex-A9",
"arm/armv7-ca9" },
44 char *op_name_from_perf_id(
void)
47 struct op_perf_name names;
50 for (i = 0; i <
ARRAY_SIZE(op_perf_name_map); ++
i) {
51 names = op_perf_name_map[
i];
52 if (!
strcmp(names.perf_name, perf_name))
98 if (tail + 1 >= buftail[0].
fp)
101 return buftail[0].
fp-1;
104 static void arm_backtrace(
struct pt_regs *
const regs,
unsigned int depth)
110 frame.
fp = regs->ARM_fp;
111 frame.
sp = regs->ARM_sp;
112 frame.
lr = regs->ARM_lr;
113 frame.
pc = regs->ARM_pc;
118 while (depth-- && tail && !((
unsigned long) tail & 3))
119 tail = user_backtrace(tail);