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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
40a342cda2
commit
fea0cf842c
@@ -17,8 +17,8 @@ void free_srcline(char *srcline);
|
||||
#define SRCLINE_UNKNOWN ((char *) "??:0")
|
||||
|
||||
struct inline_list {
|
||||
struct symbol *symbol;
|
||||
char *filename;
|
||||
char *funcname;
|
||||
unsigned int line_nr;
|
||||
struct list_head list;
|
||||
};
|
||||
@@ -28,7 +28,10 @@ struct inline_node {
|
||||
struct list_head val;
|
||||
};
|
||||
|
||||
struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr);
|
||||
/* parse inlined frames for the given address */
|
||||
struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
|
||||
struct symbol *sym);
|
||||
/* free resources associated to the inline node list */
|
||||
void inline_node__delete(struct inline_node *node);
|
||||
|
||||
#endif /* PERF_SRCLINE_H */
|
||||
|
Reference in New Issue
Block a user