From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Milian Wolff <milian.wolff@kdab.com>
Cc: Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH 1/2] perf report: ensure the perf DSO mapping matches what libdw sees
Date: Fri, 2 Jun 2017 12:23:41 -0300 [thread overview]
Message-ID: <20170602152341.GB7901@redhat.com> (raw)
In-Reply-To: <20170602143753.16907-1-milian.wolff@kdab.com>
Em Fri, Jun 02, 2017 at 04:37:52PM +0200, Milian Wolff escreveu:
> In some situations the libdw unwinder stopped working properly.
> I.e. with libunwind we see:
>
> ~~~~~
> heaptrack_gui 2228 135073.400112: 641314 cycles:
> e8ed _dl_fixup (/usr/lib/ld-2.25.so)
> 15f06 _dl_runtime_resolve_sse_vex (/usr/lib/ld-2.25.so)
> ed94c KDynamicJobTracker::KDynamicJobTracker (/home/milian/projects/compiled/kf5/lib64/libKF5KIOWidgets.so.5.35.0)
> 608f3 _GLOBAL__sub_I_kdynamicjobtracker.cpp (/home/milian/projects/compiled/kf5/lib64/libKF5KIOWidgets.so.5.35.0)
> f199 call_init.part.0 (/usr/lib/ld-2.25.so)
> f2a5 _dl_init (/usr/lib/ld-2.25.so)
> db9 _dl_start_user (/usr/lib/ld-2.25.so)
> ~~~~~
>
> But with libdw and without this patch this sample is not properly
> unwound:
>
> ~~~~~
> heaptrack_gui 2228 135073.400112: 641314 cycles:
> e8ed _dl_fixup (/usr/lib/ld-2.25.so)
> 15f06 _dl_runtime_resolve_sse_vex (/usr/lib/ld-2.25.so)
> ed94c KDynamicJobTracker::KDynamicJobTracker (/home/milian/projects/compiled/kf5/lib64/libKF5KIOWidgets.so.5.35.0)
> ~~~~~
>
> Debug output showed me that libdw found a module for the last frame
> address, but it thinks it belongs to /usr/lib/ld-2.25.so. This patch
> double-checks what libdw sees and what perf knows. If the mappings
> mismatch, we now report the elf known to perf. This fixes the
> situation above, and the libdw unwinder produces the same stack as
> libunwind.
Looks ok, having both implementations matching and the callchains making
sense for your workloads is a good way to verify the sanity, thanks.
I wonder if we shouldn't somehow script this, i.e. build it with one
implementation, generate output from some test workload, build it with
the other, second output, diff it, report when not the same.
- Arnaldo
next prev parent reply other threads:[~2017-06-02 15:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 14:37 [PATCH 1/2] perf report: ensure the perf DSO mapping matches what libdw sees Milian Wolff
2017-06-02 14:37 ` [PATCH 2/2] perf report: report module before querying isactivation in dwfl unwind Milian Wolff
2017-06-02 15:25 ` Arnaldo Carvalho de Melo
2017-06-05 10:47 ` Jiri Olsa
2017-06-15 19:20 ` Jan Kratochvil
2017-06-16 16:06 ` Arnaldo Carvalho de Melo
2017-06-16 17:36 ` Arnaldo Carvalho de Melo
2017-06-02 15:23 ` Arnaldo Carvalho de Melo [this message]
2017-06-02 16:21 ` [PATCH 1/2] perf report: ensure the perf DSO mapping matches what libdw sees Milian Wolff
2017-06-02 19:49 ` Arnaldo Carvalho de Melo
2017-06-03 11:36 ` Milian Wolff
2017-06-05 10:41 ` Jiri Olsa
2017-06-15 20:38 ` Jan Kratochvil
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=20170602152341.GB7901@redhat.com \
--to=acme@redhat.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=namhyung@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).