linux/Documentation/features
Matt Turner 9280e99d87 alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
Let perf sample registers and dump the user stack, which is what the
perf tool needs for --call-graph dwarf.

The register indices follow the hardware numbering, so r0-r30 map
directly to DWARF register numbers, with pc after them. r9-r15
are callee-saved and live in switch_stack rather than pt_regs, so they
cannot be sampled. Without r15 an unwinder cannot recover the CFA of a
first frame that uses $15 as its frame pointer.

sp is not in pt_regs either: for user frames it comes from
user_stack_pointer(), and for kernel frames (PERF_SAMPLE_REGS_INTR) it
is the end of the trap frame, as in stacktrace.c.

Software events such as context switches and tracepoints hand perf a
per-CPU pt_regs filled in by perf_fetch_caller_regs() instead of a
trap frame. It is not on the stack and has no room for sp, so report
sp as 0 there rather than the address of the per-CPU buffer.

Assisted-by: Claude:claude-opus-5-5
Acked-by: Ian Rogers <irogers@google.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Link: https://lore.kernel.org/r/20261018-alpha-perf-regs-v3-v3-4-52be85332c57@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
2026-10-18 20:09:29 +02:00
..
core alpha: enable regset-based ptrace and core dumps 2026-07-19 13:15:40 +02:00
debug alpha: select ARCH_HAS_DEBUG_VM_PGTABLE 2026-10-18 00:44:42 +02:00
io/dma-contiguous Documentation: Drop IA64 from feature descriptions 2023-09-11 08:13:18 +00:00
locking alpha: enable lockdep hardirq state tracking 2026-07-19 13:16:26 +02:00
perf alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support 2026-10-18 20:09:29 +02:00
sched membarrier: riscv: Provide core serializing command 2024-02-15 08:04:14 -08:00
seccomp/seccomp-filter alpha: add support for SECCOMP and SECCOMP_FILTER 2026-04-12 19:13:59 +02:00
time Documentation/features: Update feature lists for 6.17-rc7 2025-09-25 11:17:56 -06:00
vm alpha: add ARCH_HAS_PTE_SPECIAL support 2026-10-18 00:44:41 +02:00
arch-support.txt Documentation/features: mark BATCHED_UNMAP_TLB_FLUSH doesn't apply to ARM64 2021-03-15 13:17:40 -06:00