From: Kim Phillips <kim.phillips@arm.com>
To: "Vuille, Martin (Martin)" <vmartin@avaya.com>
Cc: Milian Wolff <milian.wolff@kdab.com>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>
Subject: Re: Records call-graphs on ARM, reporting on x86_64
Date: Fri, 9 Feb 2018 14:56:08 -0600 [thread overview]
Message-ID: <20180209145608.1f37b8ddc53b398d2fc17013@arm.com> (raw)
In-Reply-To: <30C2D590D16A5C46ADFE6521910377989262D993@AZ-US1EXMB02.global.avaya.com>
On Fri, 9 Feb 2018 18:06:03 +0000
"Vuille, Martin (Martin)" <vmartin@avaya.com> wrote:
> > > Afaik this is not yet implemented in perf report when you use libunwind.
> > > When
> > > you use elfutils instead of unwinding, it could work if I'm not mistaken.
> >
>
> After further investigation, here's what I have found:
>
> 1) With the perf code as it stands, it is absolutely impossible to do cross-platform
> unwinding because the unwinding code selects Program Counter and Stack Pointer
> registers based on the host architecture, not the architecture of the ELF file.
I thought files like arch/arm/include/perf_regs.h handled that; is that
not the case?
> After doing an ugly hack to work around this, I found:
>
> 2) The DSO path passed to libdw does not account for --symfs option. So libdw
> cannot find the debug information, ever.
>
> I think I can tackle fixing (2).
>
> It seems (1) is more of an architectural issue. If I understand correctly, perf can only
> support one architecture, which is selected with conditional compilation based on
> the architecture of the machine on which perf is built. This would have to change
> to be able to dynamically select the architecture based on ELF content, same as libdw
> does.
I know perf record only does one arch, but perf report should correctly
report any host arch and non-host arch equally.
Some distros like Ubuntu provide cross unwind packages such as
android-libunwind[-dev], and I've been known to build unwind and dwarf
libraries from scratch to get the best results; not sure if this will
help you though (I work best given a list of commands that do or don't
work).
Thanks,
Kim
next prev parent reply other threads:[~2018-02-09 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 16:13 Records call-graphs on ARM, reporting on x86_64 Vuille, Martin (Martin)
2018-02-08 16:30 ` Milian Wolff
2018-02-08 17:09 ` Vuille, Martin (Martin)
2018-02-09 18:06 ` Vuille, Martin (Martin)
2018-02-09 20:56 ` Kim Phillips [this message]
2018-02-09 23:26 ` Vuille, Martin (Martin)
2018-02-12 8:28 ` Jiri Olsa
2018-02-12 16:37 ` Vuille, Martin (Martin)
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=20180209145608.1f37b8ddc53b398d2fc17013@arm.com \
--to=kim.phillips@arm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=vmartin@avaya.com \
/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