linux/tools/perf/tests
Chen Pei 0b26b346a8 perf riscv: Add perf_regs_load and enable the dwarf unwind test
riscv has no arch level perf test: tests/builtin-test.c only picks up
arch_tests[] for x86, arm64 and powerpc64, tests/Build only builds the
generic dwarf unwind test driver for x86, arm, arm64 and powerpc, and
arch/riscv/tests/ did not exist. "Test dwarf unwind" was therefore never
registered on riscv, even though DWARF is the only reliable way to walk a
riscv user stack -- the arch callchain code walks frame pointers only --
and both unwinders already support riscv, elfutils libdw generically and
libunwind through util/libunwind-arch/libunwind-riscv.c.

Add perf_regs_load() and the arch unwind sample helper modelled on the
arm64 ones, and wire riscv into the two gates. The x1..x31 slots of enum
perf_event_riscv_regs match the hardware registers one to one, and
PERF_REG_RISCV_PC is filled with ra so that unwinding starts at the
caller.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-09-22 14:42:08 +02:00
..
config-fragments
shell perf test: Expand tests for --hybrid-merge 2026-09-18 17:38:26 -03:00
workloads perf test: Add Arm CoreSight callchain test 2026-07-03 16:52:00 -07:00
api-io.c
backward-ring-buffer.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
bitmap.c libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
bp_account.c
bp_signal_overflow.c
bp_signal.c perf tools: Make more global variables static 2026-04-08 19:21:04 -07:00
Build perf riscv: Add perf_regs_load and enable the dwarf unwind test 2026-09-22 14:42:08 +02:00
builtin-test.c perf riscv: Add perf_regs_load and enable the dwarf unwind test 2026-09-22 14:42:08 +02:00
code-reading.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
cpumap.c libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
demangle-java-test.c
demangle-ocaml-test.c
demangle-rust-v0-test.c
dlfilter-test.c perf event: Fix size of synthesized sample with branch stacks 2026-05-20 16:11:30 -03:00
dso-data.c perf tools: Make more global variables static 2026-04-08 19:21:04 -07:00
dwarf-unwind.c
event_groups.c
event_update.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
event-times.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
evsel-roundtrip-name.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
evsel-tp-sched.c perf evsel: Add reference count 2026-06-30 10:17:11 -07:00
expand-cgroup.c perf parse-events: Restrict core PMU bypass to --cputype option 2026-06-30 17:09:13 -07:00
expr.c
fdarray.c perf record: Fix unhandled POLLHUP on non_perf_event descriptors 2026-09-17 12:27:34 -03:00
genelf.c
hists_common.c
hists_common.h
hists_cumulate.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
hists_filter.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
hists_link.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
hists_output.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
hwmon_pmu.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
hybrid-merge.c perf test: Expand tests for --hybrid-merge 2026-09-18 17:38:26 -03:00
is_printable_array.c
kallsyms-split.c perf machine: Propagate machine__init() error to callers 2026-06-17 09:21:03 -03:00
keep-tracking.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
kmod-path.c
make perf tests: Improvements to build-test performance 2026-09-09 17:00:36 -03:00
maps.c
mem.c
mem2node.c libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
mmap-basic.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
mmap-thread-lookup.c
openat-syscall-all-cpus.c perf evsel: Add reference count 2026-06-30 10:17:11 -07:00
openat-syscall-tp-fields.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
openat-syscall.c perf evsel: Add reference count 2026-06-30 10:17:11 -07:00
parse-events.c perf parse-events: Restrict core PMU bypass to --cputype option 2026-06-30 17:09:13 -07:00
parse-metric.c perf parse-events: Restrict core PMU bypass to --cputype option 2026-06-30 17:09:13 -07:00
parse-no-sample-id-all.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
pe-file-parsing.c
pe-file.c
pe-file.exe
pe-file.exe.debug
perf-hooks.c
perf-record.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
perf-targz-src-pkg
perf-time-to-tsc.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
pfm.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
pmu-events.c perf parse-events: Restrict core PMU bypass to --cputype option 2026-06-30 17:09:13 -07:00
pmu.c perf evlist: Add reference count 2026-06-30 10:17:10 -07:00
sample-parsing.c perf evsel: Validate RAW sample before byte swapping 2026-09-04 21:08:43 -03:00
sdt.c
sigtrap.c
stat.c
subcmd-help.c perf test subcmd help: Add exclude disjoint subcmd names 2026-01-12 15:57:23 -03:00
sw-clock.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
switch-tracking.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
symbols.c perf symbol: Add setters for bitfields sharing a byte to avoid concurrent update issues 2026-06-03 16:53:45 -03:00
task-exit.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
tests-scripts.c perf test: Skip shebang and SPDX comments in shell test descriptions 2026-06-04 11:40:36 -03:00
tests-scripts.h
tests.h perf test: Expand tests for --hybrid-merge 2026-09-18 17:38:26 -03:00
thread-map.c perf tools: Use calloc() where applicable 2026-04-08 19:21:05 -07:00
thread-maps-share.c perf machine: Propagate machine__init() error to callers 2026-06-17 09:21:03 -03:00
time-utils-test.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
tool_pmu.c perf evsel: Restrict incremental open error unwind 2026-09-22 14:41:49 +02:00
topology.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
uncore-event-sorting.c perf evlist: Add reference count checking 2026-06-30 10:17:11 -07:00
unit_number__scnprintf.c
util.c perf test: Split monolithic 'util' test suite into sub-tests 2026-06-04 11:40:51 -03:00
vmlinux-kallsyms.c perf machine: Propagate machine__init() error to callers 2026-06-17 09:21:03 -03:00
wp.c perf tools: Make more global variables static 2026-04-08 19:21:04 -07:00