xref: /openbmc/linux/tools/perf/util/srcline.h (revision 711aab1d)
1 #ifndef PERF_SRCLINE_H
2 #define PERF_SRCLINE_H
3 
4 #include <linux/list.h>
5 #include <linux/types.h>
6 
7 struct dso;
8 struct symbol;
9 
10 extern bool srcline_full_filename;
11 char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
12 		  bool show_sym, bool show_addr);
13 char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
14 		  bool show_sym, bool show_addr, bool unwind_inlines);
15 void free_srcline(char *srcline);
16 
17 #define SRCLINE_UNKNOWN  ((char *) "??:0")
18 
19 struct inline_list {
20 	char			*filename;
21 	char			*funcname;
22 	unsigned int		line_nr;
23 	struct list_head	list;
24 };
25 
26 struct inline_node {
27 	u64			addr;
28 	struct list_head	val;
29 };
30 
31 struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr);
32 void inline_node__delete(struct inline_node *node);
33 
34 #endif /* PERF_SRCLINE_H */
35