From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH 2/3] perf symbol: Implement a very simple ELF symbol parser
Date: Mon, 17 Nov 2014 11:31:10 +0900 [thread overview]
Message-ID: <87sihitv69.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20141110120904.GO18464@kernel.org> (Arnaldo Carvalho de Melo's message of "Mon, 10 Nov 2014 09:09:04 -0300")
On Mon, 10 Nov 2014 09:09:04 -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Nov 10, 2014 at 03:36:48PM +0900, Namhyung Kim escreveu:
>> Hi Arnaldo,
>>
>> On Fri, 7 Nov 2014 12:26:18 -0300, Arnaldo Carvalho de Melo wrote:
>> > Em Fri, Nov 07, 2014 at 02:20:05PM +0900, Namhyung Kim escreveu:
>> >> It'll be used to show (userspace) symbol names when libelf isn't (or
>> >> cannot be) linked.
>> >
>> > Does this deals with prelink, etc?
>>
>> I believe so. :)
>>
>> >
>> >> # Overhead Command Shared Object Symbol
>> >> # ........ .......... ................. .........................
>> >> #
>> >> 37.01% mem-memcpy libc-2.17.so [.] __memcpy_ssse3_back
>>
>> namhyung@sejong:linux$ readelf -WS /lib64/libc-2.17.so | grep prelink
>> [41] .gnu.prelink_undo PROGBITS 0000000000000000 200368 000c30 01 0 0 8
>>
>> namhyung@sejong:linux$ nm /lib64/libc-2.17.so | grep __memcpy_ssse3_back
>> 0000003153f46f40 t __memcpy_ssse3_back
>
> Right, in this case most of the samples seems to map to what is expected
> for that workload, and the binary was prelinked. Good.
>
> What about binaries that are not prelinked? IIRC there is code in the
> full blown ELF symbol-elf.c file to detect that and act accordingly,
> from a _very_ quick look I didn't saw it in this minimalistic ELF symtab
> reader, hence my question.
AFAIK we deal with prelink'ed binary and normal binary as same way - we
only cares about the file offsets.
$ perf top --stdio
PerfTop: 110 irqs/sec kernel:70.0% exact: 0.0% [4000Hz cycles], (all, 12 CPUs)
--------------------------------------------------------------------------------------------
9.42% perf [.] map__process_kallsym_symbol
8.91% [kernel] [k] kallsyms_expand_symbol.constprop.1
6.80% [kernel] [k] memcpy
6.08% [kernel] [k] vsnprintf
...
Thanks,
Namhyung
next prev parent reply other threads:[~2014-11-17 2:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 5:20 [PATCH 1/3] perf tools: Allow vmlinux to fallback to kallsyms on NO_LIBELF=1 Namhyung Kim
2014-11-07 5:20 ` [PATCH 2/3] perf symbol: Implement a very simple ELF symbol parser Namhyung Kim
2014-11-07 15:26 ` Arnaldo Carvalho de Melo
2014-11-10 6:36 ` Namhyung Kim
2014-11-10 12:09 ` Arnaldo Carvalho de Melo
2014-11-17 2:31 ` Namhyung Kim [this message]
2014-11-07 5:20 ` [PATCH 3/3] perf tools: Clean up libelf feature support code Namhyung Kim
2014-11-20 7:36 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-11-07 8:27 ` [PATCH 1/3] perf tools: Allow vmlinux to fallback to kallsyms on NO_LIBELF=1 Peter Zijlstra
2014-11-07 14:57 ` Namhyung Kim
2014-11-07 17:37 ` Peter Zijlstra
2014-11-10 6:33 ` Namhyung Kim
2014-11-10 12:11 ` Peter Zijlstra
2014-11-11 4:24 ` Namhyung Kim
2014-11-11 10:27 ` Peter Zijlstra
2014-11-11 13:03 ` Arnaldo Carvalho de Melo
2014-11-11 14:02 ` Arnaldo Carvalho de Melo
2014-11-11 17:19 ` Peter Zijlstra
2014-11-20 7:37 ` [tip:perf/core] perf symbols: Fallback to kallsyms when using the minimal 'ELF' loader tip-bot for Arnaldo Carvalho de Melo
2014-11-11 13:02 ` [PATCH 1/3] perf tools: Allow vmlinux to fallback to kallsyms on NO_LIBELF=1 Arnaldo Carvalho de Melo
2014-11-17 1:55 ` Namhyung Kim
2014-11-07 15:21 ` David Ahern
2014-11-10 7:40 ` Namhyung Kim
2014-11-10 14:20 ` David Ahern
2014-11-07 15:29 ` Arnaldo Carvalho de Melo
2014-11-10 6:53 ` Namhyung Kim
2014-11-10 12:11 ` Arnaldo Carvalho de Melo
2014-11-17 2:04 ` Namhyung Kim
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=87sihitv69.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.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
Powered by JetHome