From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Milian Wolff <milian.wolff@kdab.com>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>,
Jiri Olsa <jolsa@kernel.org>, Jin Yao <yao.jin@linux.intel.com>,
Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf record: use unmapped IP for inline callchain cursors
Date: Wed, 3 Oct 2018 09:05:37 +0530 [thread overview]
Message-ID: <f71ed02b-1234-db9c-6a48-1a399359b5e8@linux.ibm.com> (raw)
In-Reply-To: <20181002153236.GD3541@kernel.org>
On 10/02/2018 09:02 PM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Oct 02, 2018 at 09:39:49AM +0200, Milian Wolff escreveu:
>> Only use the mapped IP to find inline frames, but keep
>> using the unmapped IP for the callchain cursor. This
>> ensures we properly show the unmapped IP when displaying
>> a frame we received via the dso__parse_addr_inlines API
>> for a module which does not contain sufficient debug symbols
>> to show the srcline.
>
> So, the patch came mangled, I fixed it up, please check, I'm adding Ravi
> to the CC list, so that he can check as well and retest, right Ravi?
>
> - Arnaldo
>
> From d9ddee9653d5676130471de9bc688fc7ec7b4fc4 Mon Sep 17 00:00:00 2001
> From: Milian Wolff <milian.wolff@kdab.com>
> Date: Tue, 2 Oct 2018 09:39:49 +0200
> Subject: [PATCH 1/1] perf record: use unmapped IP for inline callchain cursors
>
> Only use the mapped IP to find inline frames, but keep using the unmapped IP
> for the callchain cursor. This ensures we properly show the unmapped IP when
> displaying a frame we received via the dso__parse_addr_inlines API for a module
> which does not contain sufficient debug symbols to show the srcline.
>
> Before:
>
> $ perf record -e cycles:u --call-graph ls
> $ perf script
> ...
> ls 12853 2735.563911: 43354 cycles:u:
> 17878 __GI___tunables_init+0xffff01d1d63a0118 (/usr/lib/ld-2.28.so)
> 19ee9 _dl_sysdep_start+0xffff01d1d63a02e9 (/usr/lib/ld-2.28.so)
> 3087 _dl_start+0xffff01d1d63a0287 (/usr/lib/ld-2.28.so)
> 2007 _start+0xffff01d1d63a0007 (/usr/lib/ld-2.28.so)
>
> After:
>
> $ perf script
> ...
> ls 12853 2735.563911: 43354 cycles:u:
> 7f1714e46878 __GI___tunables_init+0x118 (/usr/lib/ld-2.28.so)
> 7f1714e48ee9 _dl_sysdep_start+0x2e9 (/usr/lib/ld-2.28.so)
> 7f1714e32087 _dl_start+0x287 (/usr/lib/ld-2.28.so)
> 7f1714e31007 _start+0x7 (/usr/lib/ld-2.28.so)
With current perf/urgent:
$ sudo ./perf record --call-graph=dwarf -e probe_libc:inet_pton -- ping -6 -c 1 ::1
$ sudo ./perf script
ping 4109 [011] 767269.031273: probe_libc:inet_pton: (7fff944cb458)
15b458 __inet_pton+0xffff0000d7920008 (inlined)
10feb3 gaih_inet.constprop.7+0xffff0000d7920f43 (/usr/lib64/libc-2.26.
110a13 __GI_getaddrinfo+0xffff0000d7920163 (inlined)
13c752d6f _init+0xbfb (/usr/bin/ping)
2371f generic_start_main.isra.0+0xffff0000d792013f (/usr/lib64/libc-2
2391b __libc_start_main+0xffff0000d79200bb (/usr/lib64/libc-2.26.so)
With this patch:
$ sudo ./perf script
ping 4109 [011] 767269.031273: probe_libc:inet_pton: (7fff944cb458)
7fff944cb458 __inet_pton+0x8 (inlined)
7fff9447feb3 gaih_inet.constprop.7+0xf43 (/usr/lib64/libc-2.26.so)
7fff94480a13 __GI_getaddrinfo+0x163 (inlined)
13c752d6f _init+0xbfb (/usr/bin/ping)
7fff9439371f generic_start_main.isra.0+0x13f (/usr/lib64/libc-2.26.so)
7fff9439391b __libc_start_main+0xbb (/usr/lib64/libc-2.26.so)
LGTM.
Tested-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
next prev parent reply other threads:[~2018-10-03 3:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 13:52 [PATCH 1/3] perf report: don't try to map ip to invalid map Milian Wolff
2018-09-26 13:52 ` [PATCH 2/3] perf report: use the offset address to find inline frames Milian Wolff
2018-09-27 16:00 ` Jiri Olsa
2018-09-27 19:12 ` Arnaldo Carvalho de Melo
2018-10-02 7:39 ` [PATCH] perf record: use unmapped IP for inline callchain cursors Milian Wolff
2018-10-02 15:32 ` Arnaldo Carvalho de Melo
2018-10-03 3:35 ` Ravi Bangoria [this message]
2018-10-05 13:48 ` Arnaldo Carvalho de Melo
2018-10-08 18:49 ` Milian Wolff
2018-10-05 14:11 ` Arnaldo Carvalho de Melo
2018-10-05 16:21 ` [tip:perf/urgent] perf record: Use " tip-bot for Milian Wolff
2018-09-26 13:52 ` [PATCH 3/3] perf report: don't crash on invalid inline debug information Milian Wolff
2018-09-27 19:10 ` Arnaldo Carvalho de Melo
2018-10-11 18:23 ` Milian Wolff
2018-10-11 19:39 ` Arnaldo Carvalho de Melo
2018-10-15 20:51 ` Milian Wolff
2018-10-16 17:49 ` Arnaldo Carvalho de Melo
2018-10-16 17:52 ` Arnaldo Carvalho de Melo
2018-10-16 19:00 ` Milian Wolff
2018-10-16 20:06 ` Arnaldo Carvalho de Melo
2018-10-18 6:20 ` [tip:perf/urgent] perf report: Don't " tip-bot for Milian Wolff
2018-09-26 14:18 ` [PATCH 1/3] perf report: don't try to map ip to invalid map Arnaldo Carvalho de Melo
2018-09-26 14:41 ` Milian Wolff
2018-09-27 19:07 ` Arnaldo Carvalho de Melo
2018-09-27 8:48 ` Sandipan Das
2018-09-27 19:11 ` Arnaldo Carvalho de Melo
2018-09-27 16:02 ` Jiri Olsa
2018-10-05 16:20 ` [tip:perf/urgent] perf report: Don't " 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=f71ed02b-1234-db9c-6a48-1a399359b5e8@linux.ibm.com \
--to=ravi.bangoria@linux.ibm.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=yao.jin@linux.intel.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;
as well as URLs for NNTP newsgroup(s).