From: Ingo Molnar <mingo@kernel.org>
To: He Kuang <hekuang@huawei.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
jolsa@redhat.com, rabin.vincent@axis.com, namhyung@kernel.org,
wangnan0@huawei.com, mark.rutland@arm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf symbols: Fix wrong symbol offset according to p_addr
Date: Mon, 11 Jan 2016 12:25:34 +0100 [thread overview]
Message-ID: <20160111112534.GA4921@gmail.com> (raw)
In-Reply-To: <1452068774-19491-1-git-send-email-hekuang@huawei.com>
* He Kuang <hekuang@huawei.com> wrote:
> Perf missed the 'VirtAddr' value in elf program_headers when adjusting
> symbol address for dynamic libraries. This patch considers the p_addr
> value and gets the right symbol offset.
s/gets/calculates
>
> Before this patch, some symbols can not be right parsed on android phone:
s/Before this patch, some symbols are not parsed correctly on android phones:
>
> init 369 [002] 339.970607: raw_syscalls:sys_enter: NR 22 (b, 7fd9e360a0, 10, ffffffff, 0, 8)
> ...
> 230ac [unknown] (/system/lib64/libsurfaceflinger.so)
> 11a0 main (/system/bin/surfaceflinger)
> 1c3fc __libc_init (/system/lib64/libc.so)
> fd0 _start (/system/bin/surfaceflinger)
> 29ec __dl__start (/system/bin/linker64)
>
> After this patch:
>
> init 369 [002] 339.970607: raw_syscalls:sys_enter: NR 22 (b, 7fd9e360a0, 10, ffffffff, 0, 8)
> ...
> 3a0ac _ZN7android14SurfaceFlinger3runEv (/system/lib64/libsurfaceflinger.so)
> 11a0 main (/system/bin/surfaceflinger)
> 1c3fc __libc_init (/system/lib64/libc.so)
> fd0 _start (/system/bin/surfaceflinger)
> 29ec __dl__start (/system/bin/linker64)
> --- a/tools/perf/util/dso.h
> +++ b/tools/perf/util/dso.h
> @@ -166,6 +166,7 @@ struct dso {
> const char *long_name;
> u16 long_name_len;
> u16 short_name_len;
> + u64 vaddr;
> void *dwfl; /* DWARF debug info */
btw., looks like there's some extra spaces in front of those other field
definitions.
Also, might make sense to describe what 'vaddr' stands for precisely, the naming
is pretty ambiguous.
Thanks,
Ingo
next prev parent reply other threads:[~2016-01-11 11:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 9:14 [bug] wrong result of android callchain He Kuang
2016-01-05 10:20 ` Peter Zijlstra
2016-01-05 11:13 ` Will Deacon
2016-01-06 8:26 ` [PATCH] perf symbols: Fix wrong symbol offset according to p_addr He Kuang
2016-01-11 11:25 ` Ingo Molnar [this message]
2016-01-12 2:58 ` [PATCH v2] " He Kuang
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=20160111112534.GA4921@gmail.com \
--to=mingo@kernel.org \
--cc=acme@kernel.org \
--cc=hekuang@huawei.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rabin.vincent@axis.com \
--cc=wangnan0@huawei.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;
as well as URLs for NNTP newsgroup(s).