OSDN Git Service

perf callchain: Refactor inline_list to operate on symbols
authorMilian Wolff <milian.wolff@kdab.com>
Mon, 9 Oct 2017 20:32:57 +0000 (22:32 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 24 Oct 2017 12:59:55 +0000 (09:59 -0300)
commitfea0cf842c7aa08950063264ab1cfbce4ba38c1b
treea5ecd70ef05998cf4f49332ac72d38f8beacc861
parent40a342cda2cd9bc8f7bf81c5ce1a141584760757
perf callchain: Refactor inline_list to operate on symbols

This is a requirement to create real callchain entries for inlined
frames.

Since the list of inlines usually contains the target symbol too, i.e.
the location where the frames get inlined to, we alias that symbol and
reuse it as-is is. This ensures that other dependent functionality keeps
working, most notably annotation of the target frames.

For all other entries in the inline_list, a fake symbol is created.
These are marked by new 'inlined' member which is set to true. Only
those symbols are managed by the inline_list and get freed when the
inline_list is deleted from within inline_node__delete.

Signed-off-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yao Jin <yao.jin@linux.intel.com>
Link: http://lkml.kernel.org/r/20171009203310.17362-4-milian.wolff@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/srcline.c
tools/perf/util/srcline.h
tools/perf/util/symbol.h