summaryrefslogtreecommitdiff
path: root/tools/perf/util/srcline.h
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2017-10-09 22:32:57 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-10-24 09:59:55 -0300
commitfea0cf842c7aa08950063264ab1cfbce4ba38c1b (patch)
treea5ecd70ef05998cf4f49332ac72d38f8beacc861 /tools/perf/util/srcline.h
parent40a342cda2cd9bc8f7bf81c5ce1a141584760757 (diff)
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>
Diffstat (limited to 'tools/perf/util/srcline.h')
-rw-r--r--tools/perf/util/srcline.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/srcline.h b/tools/perf/util/srcline.h
index 7b52ba88676e..730bfd6926d7 100644
--- a/tools/perf/util/srcline.h
+++ b/tools/perf/util/srcline.h
@@ -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 */