lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 18/18] perf tools: Fix output of symbol_daddr offset
    Date
    From: Namhyung Kim <namhyung.kim@lge.com>

    The symbol addresses in a dso have relative offsets from the start of
    a mapping. So in order to ouput correct offset value from @ip, one of
    them should be converted.

    Cc: Stephane Eranian <eranian@google.com>
    Signed-off-by: Namhyung Kim <namhyung@kernel.org>
    ---
    tools/perf/util/sort.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
    index 8164544..d9cb158 100644
    --- a/tools/perf/util/sort.c
    +++ b/tools/perf/util/sort.c
    @@ -186,7 +186,7 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
    if (map->type == MAP__VARIABLE) {
    ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name);
    ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx",
    - ip - sym->start);
    + ip - map->unmap_ip(map, sym->start));
    ret += repsep_snprintf(bf + ret, size - ret, "%-*s",
    width - ret, "");
    } else {
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2013-01-07 20:21    [W:5.714 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site