From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
"Liang, Kan" <kan.liang@linux.intel.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH v2] perf: Fix display of kernel symbols
Date: Wed, 8 Jan 2025 16:55:53 -0300 [thread overview]
Message-ID: <Z37YSfVMabaJ3A8z@x1> (raw)
In-Reply-To: <590b2f02-f7f0-48b2-b45e-8a31bbadef2a@csgroup.eu>
On Wed, Jan 08, 2025 at 06:06:03PM +0100, Christophe Leroy wrote:
>
>
> Le 08/01/2025 à 15:53, Arnaldo Carvalho de Melo a écrit :
> > On Wed, Jan 08, 2025 at 10:54:20AM +0100, Christophe Leroy wrote:
> > > Since commit 659ad3492b91 ("perf maps: Switch from rbtree to lazily
> > > sorted array for addresses"), perf doesn't display anymore kernel
> > > symbols on powerpc, allthough it still detects them as kernel addresses.
> > >
> > > # Overhead Command Shared Object Symbol
> > > # ........ .......... ............. ......................................
> > > #
> > > 80.49% Coeur main [unknown] [k] 0xc005f0f8
> > > 3.91% Coeur main gau [.] engine_loop.constprop.0.isra.0
> > > 1.72% Coeur main [unknown] [k] 0xc005f11c
> > > 1.09% Coeur main [unknown] [k] 0xc01f82c8
> > > 0.44% Coeur main libc.so.6 [.] epoll_wait
> > > 0.38% Coeur main [unknown] [k] 0xc0011718
> > > 0.36% Coeur main [unknown] [k] 0xc01f45c0
> > >
> > > This is because function maps__find_next_entry() now returns current
> > > entry instead of next entry, leading to kernel map end address
> > > getting mis-configured with its own start address instead of the
> > > start address of the following map.
> > >
> > > Fix it by really taking the next entry, also make sure that entry
> > > follows current one by making sure entries are sorted.
> > >
> > > Fixes: 659ad3492b91 ("perf maps: Switch from rbtree to lazily sorted array for addresses")
> > > Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> > > Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > ---
> > > v2: Make sure the entries are sorted, if not sort them.
> >
> > Since you have changed what I reviewed I'll have to re-review :-) Will
> > try to do it after some calls.
>
> Ah yes sorry, should have removed your Reviewed-by.
>
> Based on Ian's feedback "Using the next entry in this way won't work if the
> entries aren't sorted", I added the following block in front of the initial
> change:
>
> + while (!maps__maps_by_address_sorted(maps)) {
> + up_read(maps__lock(maps));
> + maps__sort_by_address(maps);
> + down_read(maps__lock(maps));
> + }
Its ok, I'll keep it now that I looked at it.
Thanks!
- Arnaldo
next prev parent reply other threads:[~2025-01-08 19:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 9:54 [PATCH v2] perf: Fix display of kernel symbols Christophe Leroy
2025-01-08 14:53 ` Arnaldo Carvalho de Melo
2025-01-08 17:06 ` Christophe Leroy
2025-01-08 19:55 ` Arnaldo Carvalho de Melo [this message]
2025-01-08 17:15 ` Ian Rogers
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=Z37YSfVMabaJ3A8z@x1 \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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).