diff options
author | Mao Han <han_mao@c-sky.com> | 2019-09-04 23:46:36 -0400 |
---|---|---|
committer | Paul Walmsley <paul.walmsley@sifive.com> | 2019-09-05 03:51:52 -0400 |
commit | 51bc620ba972e1600b791a32c69fa28c80e16fdb (patch) | |
tree | 155a116b0e7cfe486683d7432870dcfb93aa9572 /tools/arch | |
parent | 98a93b0b561c571153b7cd6953e882bc3fd8cfcd (diff) |
riscv: Add support for libdw
This patch adds support for DWARF register mappings and libdw registers
initialization, which is used by perf callchain analyzing when
--call-graph=dwarf is given.
Signed-off-by: Mao Han <han_mao@c-sky.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: linux-riscv <linux-riscv@lists.infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Guo Ren <guoren@kernel.org>
Tested-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Diffstat (limited to 'tools/arch')
-rw-r--r-- | tools/arch/riscv/include/uapi/asm/perf_regs.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/arch/riscv/include/uapi/asm/perf_regs.h b/tools/arch/riscv/include/uapi/asm/perf_regs.h new file mode 100644 index 000000000000..196f964bfcb4 --- /dev/null +++ b/tools/arch/riscv/include/uapi/asm/perf_regs.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
2 | /* Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd. */ | ||
3 | |||
4 | #ifndef _ASM_RISCV_PERF_REGS_H | ||
5 | #define _ASM_RISCV_PERF_REGS_H | ||
6 | |||
7 | enum perf_event_riscv_regs { | ||
8 | PERF_REG_RISCV_PC, | ||
9 | PERF_REG_RISCV_RA, | ||
10 | PERF_REG_RISCV_SP, | ||
11 | PERF_REG_RISCV_GP, | ||
12 | PERF_REG_RISCV_TP, | ||
13 | PERF_REG_RISCV_T0, | ||
14 | PERF_REG_RISCV_T1, | ||
15 | PERF_REG_RISCV_T2, | ||
16 | PERF_REG_RISCV_S0, | ||
17 | PERF_REG_RISCV_S1, | ||
18 | PERF_REG_RISCV_A0, | ||
19 | PERF_REG_RISCV_A1, | ||
20 | PERF_REG_RISCV_A2, | ||
21 | PERF_REG_RISCV_A3, | ||
22 | PERF_REG_RISCV_A4, | ||
23 | PERF_REG_RISCV_A5, | ||
24 | PERF_REG_RISCV_A6, | ||
25 | PERF_REG_RISCV_A7, | ||
26 | PERF_REG_RISCV_S2, | ||
27 | PERF_REG_RISCV_S3, | ||
28 | PERF_REG_RISCV_S4, | ||
29 | PERF_REG_RISCV_S5, | ||
30 | PERF_REG_RISCV_S6, | ||
31 | PERF_REG_RISCV_S7, | ||
32 | PERF_REG_RISCV_S8, | ||
33 | PERF_REG_RISCV_S9, | ||
34 | PERF_REG_RISCV_S10, | ||
35 | PERF_REG_RISCV_S11, | ||
36 | PERF_REG_RISCV_T3, | ||
37 | PERF_REG_RISCV_T4, | ||
38 | PERF_REG_RISCV_T5, | ||
39 | PERF_REG_RISCV_T6, | ||
40 | PERF_REG_RISCV_MAX, | ||
41 | }; | ||
42 | #endif /* _ASM_RISCV_PERF_REGS_H */ | ||