From: Michael Hudson-Doyle <michael.hudson@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@redhat.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Will Deacon <will.deacon@arm.com>,
Jean Pihet <jean.pihet@linaro.org>
Subject: perf confused by modules being loaded in between addresses in /proc/kallsyms
Date: Tue, 29 Oct 2013 17:53:39 -0700 [thread overview]
Message-ID: <87ob67y3xo.fsf@canonical.com> (raw)
Hi,
On arm, probably since "ARM: use linker magic for vectors and vector
stubs" (although I haven't checked this), perf report tends to allocate
all kernel time to the module loaded at the highest address.
This turns out to be because the "perf_event__synthesize_modules"
generates a PERF_RECORD_MMAP for the last module thats runs from its
start to the end of the address space.
This in turn turns out be because the first symbol in /proc/kallsyms is
now at 0:
# head -n 2 /proc/kallsyms
00000000 t __vectors_start
c00081c0 T asm_do_IRQ
/This/ means that the kallsyms entry in machine->kmaps[MAP__FUNCTION] is
now the first entry rather than the last in the map, so the last module
is the last in the map and so its "end" stays as ~0ULL.
I'm told that there is no particularly good reason for __vectors_start
to be in kallsyms at 0, but in any case this seems like a bug in the
user space tool. I notice that there is code to split the kallsyms
symbols around symbols from modules (dso__split_kallsyms) but this
doesn't seem to be called for record, only report. Is the fix as simple
as making sure this happens for record as well? I don't feel qualified
to answer that.
Cheers,
mwh
next reply other threads:[~2013-10-30 0:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 0:53 Michael Hudson-Doyle [this message]
2013-10-31 3:22 ` perf confused by modules being loaded in between addresses in /proc/kallsyms Ming Lei
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=87ob67y3xo.fsf@canonical.com \
--to=michael.hudson@linaro.org \
--cc=acme@redhat.com \
--cc=jean.pihet@linaro.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=will.deacon@arm.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