]> asedeno.scripts.mit.edu Git - linux.git/commit
perf callchain: Store srcline in callchain_cursor_node
authorMilian Wolff <milian.wolff@kdab.com>
Mon, 9 Oct 2017 20:32:56 +0000 (22:32 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 24 Oct 2017 12:59:55 +0000 (09:59 -0300)
commit40a342cda2cd9bc8f7bf81c5ce1a141584760757
tree21f9ebf584f25c45e7fe8bf0280c2d6d9c6cac8a
parent2a704fc8db7b0080a67d9f4f4cb2a7bcaf79949d
perf callchain: Store srcline in callchain_cursor_node

This is mostly a preparation to enable the creation of full callchain
nodes for inline frames. Such frames will reference the IP of the
non-inlined frame, but hold the symbol and srcline for an inlined
location. As such, we won't be able to query the srcline on-demand based
on the IP alone. Instead, we will leverage the functionality provided by
this patch here, and store the srcline for the inlined nodes in the new
srcline member of callchain_cursor_node.

Note that this patch on its own leaks the srcline, as there is no
free_callchain_cursor_node or similar. A future patch will add caching
of the srcline and handle deletion properly.

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-3-milian.wolff@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/callchain.c
tools/perf/util/callchain.h
tools/perf/util/machine.c