blob: 8e73f607dfa315d4a1808285adf7a759501b1f23 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* 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
8struct dso;
9struct symbol;
10
11extern bool srcline_full_filename;
12char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
13 bool show_sym, bool show_addr);
14char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
15 bool show_sym, bool show_addr, bool unwind_inlines);
16void free_srcline(char *srcline);
17
18#define SRCLINE_UNKNOWN ((char *) "??:0")
19
20struct inline_list {
21 char *filename;
22 char *funcname;
23 unsigned int line_nr;
24 struct list_head list;
25};
26
27struct inline_node {
28 u64 addr;
29 struct list_head val;
30};
31
32struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr);
33void inline_node__delete(struct inline_node *node);
34
35#endif /* PERF_SRCLINE_H */