From: Eric Saint Etienne <eric.saint.etienne@oracle.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
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: Fri, 23 Nov 2018 10:24:21 -0800 (PST) [thread overview]
Message-ID: <3f427959-a41f-4ff4-b095-ef8af11665c9@default> (raw)
In-Reply-To: <20181123160337.GA5575@krava>
> > + /*
> > + * 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()
-eric
next prev parent reply other threads:[~2018-11-23 18:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 10:25 Eric Saint-Etienne
2018-11-23 16:03 ` Jiri Olsa
2018-11-23 18:24 ` Eric Saint Etienne [this message]
2018-11-26 8:39 ` Jiri Olsa
2018-11-26 18:53 ` Arnaldo Carvalho de Melo
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=3f427959-a41f-4ff4-b095-ef8af11665c9@default \
--to=eric.saint.etienne@oracle.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=darren.kenny@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®