Linux Perf Users
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	 Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	 Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	 Adrian Hunter <adrian.hunter@intel.com>,
	 James Clark <james.clark@linaro.org>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Matt Turner <mattst88@gmail.com>
Subject: [PATCH 0/2] perf: Alpha annotation support
Date: Sat, 05 Sep 2026 18:54:10 -0400	[thread overview]
Message-ID: <20260905-perf-alpha-annotate-v1-0-97380433ccb6@gmail.com> (raw)

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.

Signed-off-by: Matt Turner <mattst88@gmail.com>
---
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,
-- 
Matt Turner <mattst88@gmail.com>


             reply	other threads:[~2026-09-05 22:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05 22:54 Matt Turner [this message]
2026-09-05 22:54 ` [PATCH 1/2] perf thread: Fix live-session detection in thread__e_machine() Matt Turner
2026-09-05 23:05   ` sashiko-bot
2026-09-08 17:34   ` Ian Rogers
2026-09-05 22:54 ` [PATCH 2/2] perf annotate: add Alpha instruction support Matt Turner
2026-09-05 22:59   ` sashiko-bot
2026-09-08 17:35   ` Ian Rogers
2026-09-08 21:11     ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260905-perf-alpha-annotate-v1-0-97380433ccb6@gmail.com \
    --to=mattst88@gmail.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox