perf callchain: Refactor inline_list to store srcline string directly

This is a preparation for the creation of real callchain entries for
inlined frames. The rest of the perf code uses the srcline string. As
such, using that also for the srcline API allows us to simplify some of
the upcoming code. Most notably, it will allow us to cache the srcline
for a given inline node and reuse it for different callchain entries.

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-5-milian.wolff@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Milian Wolff
2017-10-09 22:32:58 +02:00
committed by Arnaldo Carvalho de Melo
parent fea0cf842c
commit 2be8832f3c
2 changed files with 41 additions and 16 deletions

View File

@@ -18,8 +18,7 @@ void free_srcline(char *srcline);
struct inline_list {
struct symbol *symbol;
char *filename;
unsigned int line_nr;
char *srcline;
struct list_head list;
};