mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Jean Pihet <jean.pihet@linaro.org>
Cc: Arun Sharma <arun@sharma-home.net>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Will Deacon <will.deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	libunwind-devel <libunwind-devel@nongnu.org>
Subject: Re: [Libunwind-devel] [RFC PATCH 0/3] Add support for dwarf compat mode unwinding
Date: Mon, 3 Feb 2014 17:36:00 +0100	[thread overview]
Message-ID: <20140203163600.GA1129@krava.brq.redhat.com> (raw)
In-Reply-To: <CAFrcx1mdRb6M24TsNWaZ6eEp2QFke3xvxqC2F96G7mdJ29t7JQ@mail.gmail.com>

On Mon, Feb 03, 2014 at 04:28:06PM +0100, Jean Pihet wrote:
> Hi Arun,
> 
> On 22 January 2014 06:15, Arun Sharma <arun@sharma-home.net> wrote:
> > On Tue, Jan 21, 2014 at 12:16 AM, Jean Pihet <jean.pihet@linaro.org> wrote:
> >
> >>>> This is the case when e.g. profiling an ARMv7 binary that runs on an
> >>>> ARMv8 (aka AARCH64) platform.
> >>>
> >>> Why not configure libunwind for ARMv7 in that case?
> >>>
> >>> I'm trying to understand how is your use case different from using
> >>> x86_32 libunwind to do local unwinding on a x86_64 machine.
> >> Can you give more details on the use case and how to configure
> >> libunwind?
> >
> > You could either build libunwind on a ARMv7 machine and copy it over
> > or setup a 32 bit chroot on a 64 bit kernel and compile libunwind
> > inside that.
> >
> >> The provided patches dynamically detect the target binary
> >> address size and parse the debug info accordingly, all that in a
> >> single library.
> >
> > This is generally called cross-unwinding in libunwind lingo. Some
> > description here:
> >
> > http://www.nongnu.org/libunwind/man/libunwind%283%29.html#section_4
> >
> >>
> >> Note: my use case is to call libunwind from the perf utility in order
> >> to unwind from the dwarf info.
> >>
> >
> > You could link in two copies of libunwind into the perf binary:
> > * libunwind.a for local (host == target) unwinding
> > * libunwind-arm.a for 32 bit cross-unwinding
> >
> > Doing cross-unwinding requires you to write a bunch of "accessors" on
> > how to access the address space of a non-local thread.
> >
> > Something like ./configure --target=arm on aarch64.
> 
> Thanks for the link and info.
> 
> Is there a concrete example of cross-unwinding with multiple targets,
> for example on x86_64 using native and x86_32 libunwind libraries
> simultaneously?
> I am trying to assess the impact of multiple unwinding libs in the perf code.
> 
> Jiri, Arnaldo,
> How is that done on x86? I do not think this can be done with the
> current perf code, am I correct?

correct, but it sounds cool ;-)

jirka

      parent reply	other threads:[~2014-02-03 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20 21:21 Jean Pihet
2014-01-20 21:22 ` [PATCH 1/3] Add support for different binary target address sizes Jean Pihet
2014-01-20 21:22 ` [PATCH 2/3] Dwarf: load and parse the debug info of different " Jean Pihet
2014-01-20 21:22 ` [PATCH 3/3] Dwarf: unwind the recorded stack frame " Jean Pihet
2014-01-21 11:21 ` [RFC PATCH 0/3] Add support for dwarf compat mode unwinding Will Deacon
     [not found] ` <CAN7rbOstSYgZ39o68AA+z62Uj6KYzNhDkyX+sbHPr=xc-rRjRg@mail.gmail.com>
     [not found]   ` <CAFrcx1nSDD4Sts7uDxxyG9LpyQiwFhby8oLEpWW-qotyWPpGpw@mail.gmail.com>
     [not found]     ` <CAN7rbOti4ODDz9h_oMQpqdB5JWwL0wpB-7rzcbKxho_46pKawg@mail.gmail.com>
2014-02-03 15:28       ` [Libunwind-devel] " Jean Pihet
2014-02-03 15:50         ` Arun Sharma
2014-02-03 16:36         ` Jiri Olsa [this message]

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=20140203163600.GA1129@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=arun@sharma-home.net \
    --cc=jean.pihet@linaro.org \
    --cc=libunwind-devel@nongnu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.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

all inboxes | Powered by JetHome®