From: Shimin Guo <shimin.guo@skydio.com>
To: linux-perf-users@vger.kernel.org
Subject: [BUG] perf: libdw not working for data collected on a different arch than host
Date: Mon, 24 Nov 2025 10:38:56 -0800 [thread overview]
Message-ID: <CAK3u-5gjxsFbnimP0mMFM6GRki7TAfNe6YmY6KtJhApV45nSNw@mail.gmail.com> (raw)
Hi,
I see there have been patches aimed at enabling perf to unwind stacks
collected on a different arch than the host perf itself is running on,
for example, https://lore.kernel.org/all/20230606014559.21783-4-leo.yan@linaro.org/.
I believe there is still one issue that prevents me from doing
unwinding on arm64 stacks on a x86 host. As of v6.18-rc6, I still see
the following in tools/perf/util/unwind-libdw.c:
static const Dwfl_Thread_Callbacks callbacks = {
.next_thread = next_thread,
.memory_read = memory_read,
.set_initial_registers = libdw__arch_set_initial_registers,
};
libdw__arch_set_initial_registers is defined for each architecture,
and the version is chosen at compile time, not for the arch the data
is collected on. After fixing this issue, I was able to get the call
chains. Is my analysis correct?
Best,
Shimin
next reply other threads:[~2025-11-24 18:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 18:38 Shimin Guo [this message]
2025-11-26 1:43 ` [BUG] perf: libdw not working for data collected on a different arch than host Ian Rogers
2025-11-26 2:55 ` Shimin Guo
2025-11-26 19:04 ` Namhyung Kim
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=CAK3u-5gjxsFbnimP0mMFM6GRki7TAfNe6YmY6KtJhApV45nSNw@mail.gmail.com \
--to=shimin.guo@skydio.com \
--cc=linux-perf-users@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).