| rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef PERF_SRCLINE_H |
| 3 | #define PERF_SRCLINE_H |
| 4 | |
| 5 | #include <linux/list.h> |
| 6 | #include <linux/types.h> |
| 7 | |
| 8 | struct dso; |
| 9 | struct symbol; |
| 10 | |
| 11 | extern bool srcline_full_filename; |
| 12 | char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym, |
| 13 | bool show_sym, bool show_addr); |
| 14 | char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym, |
| 15 | bool show_sym, bool show_addr, bool unwind_inlines); |
| 16 | void free_srcline(char *srcline); |
| 17 | |
| 18 | #define SRCLINE_UNKNOWN ((char *) "??:0") |
| 19 | |
| 20 | struct inline_list { |
| 21 | char *filename; |
| 22 | char *funcname; |
| 23 | unsigned int line_nr; |
| 24 | struct list_head list; |
| 25 | }; |
| 26 | |
| 27 | struct inline_node { |
| 28 | u64 addr; |
| 29 | struct list_head val; |
| 30 | }; |
| 31 | |
| 32 | struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr); |
| 33 | void inline_node__delete(struct inline_node *node); |
| 34 | |
| 35 | #endif /* PERF_SRCLINE_H */ |