From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Eric Saint Etienne <eric.saint.etienne@oracle.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Namhyung Kim <namhyung@kernel.org>,
Darren Kenny <darren.kenny@oracle.com>,
Eric Saint-Etienne <eric.saintetienne@gmail.com>
Subject: Re: [PATCH] perf symbols: Cannot disassemble some routines when debuginfo present
Date: Mon, 26 Nov 2018 15:53:57 -0300 [thread overview]
Message-ID: <20181126185357.GB18491@kernel.org> (raw)
In-Reply-To: <20181126083917.GA18783@krava>
Em Mon, Nov 26, 2018 at 09:39:17AM +0100, Jiri Olsa escreveu:
> On Fri, Nov 23, 2018 at 10:24:21AM -0800, Eric Saint Etienne wrote:
> > > > + /*
> > > > + * When using -ffunction-sections, only .text gets loaded by
> > > > + * map_groups__find() into al->map. Consequently al->map address
> > > > + * range encompass the whole code.
> > > > + *
> > > > + * But map__load() has just loaded many function maps by
> > > > + * splitting al->map, which reduced al->map range drastically.
> > > > + * Very likely the target address is now in one of those newly
> > > > + * created function maps, so we need to lookup the map again
> > > > + * to find that new map.
> > > > + */
> > >
> > > hum, so map__load actualy can split the map to create new maps?
> > >
> > > cold you please point me to that code? I haven't touch this area for some
> > > time and I can't find it
> >
> > The split happens in dso_process_kernel_symbol() in symbol-elf.c where we
> > call map_groups__find_by_name() to find an existing map, but with
> > -ffunction-sections and a symbol belonging to new (function) map, such map
> > doesn't exist yet so we end up creating one and adjusting existing maps
> > accordingly because adjust_kernel_syms is set. Makes sense?
> >
> > As of 4.20-rc3 the call chain is as follows:
> > event:c:1573 map__load()
> > map.c:315 dso__load()
> > symobl.c:1528 dso__load_kernel_sym()
> > symbol.c:1896 dso__load_vmlinux_path()
> > (or we directly call dso__load_vmlinux() at line 1892)
> > symbol.c:1744 dso__load_vmlinux()
> > symbol.c:1719 dso__load_sym()
> > symbol-elf.c:1090 dso_process_kernel_symbol()
>
> i see, thank for the pointers.. could you please mention
> this in your comment and changelog as well?
>
> also to document in the code that it's related to map__load
> could you put it to the if contidion, like:
>
> + if (load_map && (al->addr < al->map->start || al->addr >= al->map->end))
>
Eric, please address Jiri's comments and send a v2, ok?
- Arnaldo
prev parent reply other threads:[~2018-11-27 12:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 10:25 [PATCH] perf symbols: Cannot disassemble some routines when debuginfo present Eric Saint-Etienne
2018-11-23 16:03 ` Jiri Olsa
2018-11-23 18:24 ` Eric Saint Etienne
2018-11-26 8:39 ` Jiri Olsa
2018-11-26 18:53 ` Arnaldo Carvalho de Melo [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=20181126185357.GB18491@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=darren.kenny@oracle.com \
--cc=eric.saint.etienne@oracle.com \
--cc=eric.saintetienne@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.