linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] perf: libdw not working for data collected on a different arch than host
@ 2025-11-24 18:38 Shimin Guo
  2025-11-26  1:43 ` Ian Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Shimin Guo @ 2025-11-24 18:38 UTC (permalink / raw)
  To: linux-perf-users

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-26 19:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24 18:38 [BUG] perf: libdw not working for data collected on a different arch than host Shimin Guo
2025-11-26  1:43 ` Ian Rogers
2025-11-26  2:55   ` Shimin Guo
2025-11-26 19:04     ` Namhyung Kim

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).