Skip to content

perf: Alpha annotation support

Matt Turner linux-perf-users lkml 1 version Applied

Status from this message: Thanks, applied to perf-tools-next, for v7.4.

Get series with b4
b4 am [email protected] change-id 20260905-perf-alpha-annotate-b49a2b8b6d99

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2perf thread: Fix live-session detection in thread__e_machine()tools/perf/util/machine.c tools/perf/util/thread.c+2 -11 reply
2/2perf annotate: add Alpha instruction supporttools/perf/util/annotate-arch/Build tools/perf/util/annotate-arch/annotate-alpha.c tools/perf/util/disasm.c +1 more+200 -22 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchIan Rogers
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] perf: Alpha annotation support

Alpha has no arch support in perf annotate, so annotating an Alpha perf.data resolves no call targets and draws no jump arrows. Patch 2 adds it. Patch 1 is a prerequisite for reading such a perf.data anywhere other than on Alpha itself: thread__e_machine() currently misdetects a file-backed session as live and falls back to EM_HOST, which silently annotates the Alpha disassembly with the x86 instruction table.

Alpha's calls need a little care. Only bsr has a real PC-relative target. jsr is register-indirect, and its trailing operand is a branch prediction hint that objdump prints as an address, so it looks like a call target without being one: in a vmlinux built from this tree, only 23093 of the 213750 jsr hints land on a symbol, while 157204 point into the middle of an unrelated function. Those are therefore left unresolved rather than reported as calls to whatever the hint happens to name.

Tested on an EV7 Marvel, both natively and by annotating its perf.data on an x86_64 host, over bsr to a local function, jsr through the PLT and kernel-mode jsr. The two hosts produce identical output.

---
Matt Turner (2):
perf thread: Fix live-session detection in thread__e_machine() perf annotate: add Alpha instruction support

 tools/perf/util/annotate-arch/Build            |   1 +
 tools/perf/util/annotate-arch/annotate-alpha.c | 185 +++++++++++++++++++++++++
 tools/perf/util/disasm.c                       |  15 +-
 tools/perf/util/disasm.h                       |   1 +
 tools/perf/util/machine.c                      |   1 +
 tools/perf/util/thread.c                       |   2 +-
 6 files changed, 202 insertions(+), 3 deletions(-)

---
base-commit: 9f0346dcbea363787186c94ef94dd01aaa215afa
change-id: 20260905-perf-alpha-annotate-b49a2b8b6d99

Best regards,

Signature · 1 line
Matt Turner <[email protected]>