From: Milian Wolff <milian.wolff@kdab.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: jolsa@kernel.org, Linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf util: take pgoff into account when reporting elf to libdwfl
Date: Tue, 30 Oct 2018 21:36:39 +0100 [thread overview]
Message-ID: <2799419.aVeE0VMyCs@agathebauer> (raw)
In-Reply-To: <20181029174014.GG21857@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]
On Montag, 29. Oktober 2018 18:40:14 CET Arnaldo Carvalho de Melo wrote:
> Em Mon, Oct 29, 2018 at 04:26:27PM +0100, Milian Wolff escreveu:
> > On Monday, October 29, 2018 3:16:44 PM CET Milian Wolff wrote:
> > > Libdwfl parses an ELF file itself and creates mappings for the
> > > individual sections. Perf on the other hand sees raw mmap events which
> > > represent individual sections. When we encounter an address pointing
> > > into a mapping with pgoff != 0, we must take that into account and
> > > report the file at the non-offset base address.
> >
> > > This fixes unwinding with libdwfl in some cases. E.g. for a file like:
> > <snip>
> >
> > > Note that the backtrace is still stopping too early, when
> > > compared to the nice results obtained via libunwind. It's
> > > unclear so far what the reason for that is.
> >
> > The remaining issue is due to a bug in elfutils:
> >
> > https://sourceware.org/ml/elfutils-devel/2018-q4/msg00089.html
> >
> > With both patches applied, libunwind and elfutils produce the same output
> > for the above scenario.
>
> I'm updating the patch to remove:
>
> "It's unclear so far what the reason for that is."
>
> Adding:
>
> "See https://sourceware.org/ml/elfutils-devel/2018-q4/msg00089.html for
> a patch fixing that."
>
> Ok?
Yes, thanks. I figured the fix for elfutils out after I submitted the perf
patch.
> Or are you saying that that "unclear" part applies to both libunwind
> and elfutils?
No, libunwind worked fine without these patches for this specific case.
Cheers
--
Milian Wolff | milian.wolff@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3826 bytes --]
next prev parent reply other threads:[~2018-10-30 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 14:16 [PATCH] perf util: take pgoff into account when reporting elf to libdwfl Milian Wolff
2018-10-29 14:56 ` Jiri Olsa
2018-10-29 15:26 ` Milian Wolff
2018-10-29 17:40 ` Arnaldo Carvalho de Melo
2018-10-30 20:36 ` Milian Wolff [this message]
2018-10-31 22:04 ` [tip:perf/urgent] perf unwind: Take " tip-bot for Milian Wolff
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=2799419.aVeE0VMyCs@agathebauer \
--to=milian.wolff@kdab.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--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