Hi Matt,

On Mon, Oct 12, 2026 at 8:40 PM Matt Turner <[email protected]> wrote:
>
> This series lets elfutils unwind on alpha, from core files
> (eu-stack --core), from stopped threads (eu-stack -p) and from perf
> samples (eu-stackprof).
>
> Patch 1 fixes the prstatus layout, which had pc and unique one slot too
> far. Patch 2 adds the ABI CFI and patch 3 reads the registers of a
> stopped thread with ptrace. Patch 4 unwinds from perf samples.
>
> Since Linux 7.1 the kernel returns a peeked value in [-4095, -1] as an
> error, which breaks patch 3 for threads with such a register value (seen
> with run-backtrace-native.sh). "alpha: enable GENERIC_ENTRY", queued in
> the alpha tree, fixes that.
>
> Patch 4 depends on the proposed kernel support for perf register
> sampling on alpha, which also provides <asm/perf_regs.h>:
>
> https://lore.kernel.org/r/[email protected]
>
> Patch 2 is also what perf record --call-graph dwarf needs from libdw on
> alpha. The perf tool side is posted as:
>
> https://lore.kernel.org/r/[email protected]
>
> Signed-off-by: Matt Turner <[email protected]>
> ---
> Matt Turner (4):
>       backends: Fix alpha prstatus pc and unique register offsets
>       backends: Add alpha abi_cfi
>       backends: Add alpha set_initial_registers_tid
>       backends, libdwfl_stacktrace: Add alpha perf sample unwinding
>
>  NEWS                                     |  4 ++
>  backends/Makefile.am                     |  3 +-
>  backends/alpha_cfi.c                     | 69 ++++++++++++++++++++++++++++++
>  backends/alpha_corenote.c                |  5 ++-
>  backends/alpha_init.c                    | 11 +++++
>  backends/alpha_initreg.c                 | 72 +++++++++++++++++++++++++++++++
>  backends/alpha_initreg_sample.c          | 73 
> ++++++++++++++++++++++++++++++++
>  backends/libebl_PERF_FLAGS.h             | 16 +++++++
>  configure.ac                             |  6 ++-
>  libdwfl_stacktrace/dwflst_sample_frame.c | 10 +++++
>  10 files changed, 265 insertions(+), 4 deletions(-)
> ---
> base-commit: 7b675cbdb0d1f216938b4b33aea30fd35fb1ae0a
> change-id: 20261001-alpha-39931d3286bb
>
> Best regards,
> --
> Matt Turner <[email protected]>
>

I built the full series and tested it with your kernel and perf-tools
patches on my AlphaServer ES40 (EV67).

Using the patched libdw/libelf, perf recovered the expected DWARF
caller chains from both existing and fresh recordings. Frames whose
CFA depends on r15 stopped at the sampled frame, as documented.

This testing covers perf's libdw unwinding path only.

Tested-by: Magnus Lindholm <[email protected]>

Thanks,
Magnus

Reply via email to