lkml.org 
[lkml]   [2016]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf symbols: Fix wrong symbol offset according to p_addr

* 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

\
 
 \ /
  Last update: 2016-01-11 13:01    [W:0.066 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site