Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1306098
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf symbols: Fix wrong symbol offset according to p_addr |
| Date | 2016-01-11 12:30 +0100 |
| Message-ID | <qPIPE-1Dk-19@gated-at.bofh.it> (permalink) |
| References | <qNxOF-1jL-7@gated-at.bofh.it> <qNRDJ-71N-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* 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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[bug] wrong result of android callchain He Kuang <hekuang@huawei.com> - 2016-01-05 10:20 +0100
Re: [bug] wrong result of android callchain Peter Zijlstra <peterz@infradead.org> - 2016-01-05 11:30 +0100
Re: [bug] wrong result of android callchain Will Deacon <will.deacon@arm.com> - 2016-01-05 12:20 +0100
[PATCH] perf symbols: Fix wrong symbol offset according to p_addr He Kuang <hekuang@huawei.com> - 2016-01-06 09:30 +0100
Re: [PATCH] perf symbols: Fix wrong symbol offset according to p_addr Ingo Molnar <mingo@kernel.org> - 2016-01-11 12:30 +0100
[PATCH v2] perf symbols: Fix wrong symbol offset according to p_addr He Kuang <hekuang@huawei.com> - 2016-01-12 04:10 +0100
csiph-web