OSDN Git Service

perf annotate: Mark jumps to outher functions with the call arrow
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 20 Mar 2018 20:20:43 +0000 (17:20 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 21 Mar 2018 19:19:55 +0000 (16:19 -0300)
commit751b1783da784299b0509adb6a9cd3024cc4f837
tree6ed36cbec51a297c315e0fa8e85838999b8fa389
parent85a84e4f813912ab77d872ff6882dd7b435fbf4e
perf annotate: Mark jumps to outher functions with the call arrow

Things like this in _cpp_lex_token (gcc's cc1 program):

     cpp_named_operator2name@@Base+0xa72

Point to a place that is after the cpp_named_operator2name boundaries,
i.e.  in the ELF symbol table for cc1 cpp_named_operator2name is marked
as being 32-bytes long, but it in fact is much larger than that, so we
seem to need a symbols__find() routine that looks for >= current->start
and  < next_symbol->start, possibly just for C++ objects?

For now lets just make some progress by marking jumps to outside the
current function as call like.

Actual navigation will come next, with further understanding of how the
symbol searching and disassembly should be done.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-aiys0a0bsgm3e00hbi6fg7yy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c
tools/perf/util/annotate.h