[PW_SID:1098046] [v3] perf riscv: Add SDT argument parsing for RISC-V#1983
[PW_SID:1098046] [v3] perf riscv: Add SDT argument parsing for RISC-V#1983linux-riscv-bot wants to merge 2 commits into
Conversation
Implement __perf_sdt_arg_parse_op_riscv() to convert RISC-V GCC-generated SDT probe operands into uprobe-compatible format, and register it in the perf_sdt_arg_parse_op() dispatcher for EM_RISCV. RISC-V GCC uses the 'nor' constraint for SDT arguments, producing operands in the following formats: Format Example Uprobe format ----------- ----------- ------------- register a0 %a0 memory (+) 8(a0) +8(%a0) memory (-) -20(s0) -20(%s0) constant 99 (skip, not supported by uprobe) Key differences from other architectures: - Register names use ABI aliases (a0-a7, t0-t6, s0-s11, sp, ra, etc.) without any '%' prefix, unlike x86 (%rax) or arm64 (x0). - Memory operands use OFFSET(REG) syntax where OFFSET may be negative, unlike arm64's [sp, NUM] or powerpc's NUM(%rREG). Two regexes are used: - SDT_OP_REGEX1: matches RISC-V ABI register names saved in pt_regs - SDT_OP_REGEX2: matches [-]NUM(REG) memory operands Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Reviewed-by: Ian Rogers <irogers@google.com> Reviewed-by: Guo Ren <guoren@kernel.org> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
|
Patch 1: "[v3] perf riscv: Add SDT argument parsing for RISC-V" |
cd9d421 to
a1231b7
Compare
PR for series 1098046 applied to workflow__riscv__fixes
Name: [v3] perf riscv: Add SDT argument parsing for RISC-V
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1098046
Version: 3