summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/srcline.h
blob: 8e73f607dfa315d4a1808285adf7a759501b1f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef PERF_SRCLINE_H
#define PERF_SRCLINE_H

#include <linux/list.h>
#include <linux/types.h>

struct dso;
struct symbol;

extern bool srcline_full_filename;
char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
		  bool show_sym, bool show_addr);
char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
		  bool show_sym, bool show_addr, bool unwind_inlines);
void free_srcline(char *srcline);

#define SRCLINE_UNKNOWN  ((char *) "??:0")

struct inline_list {
	char			*filename;
	char			*funcname;
	unsigned int		line_nr;
	struct list_head	list;
};

struct inline_node {
	u64			addr;
	struct list_head	val;
};

struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr);
void inline_node__delete(struct inline_node *node);

#endif /* PERF_SRCLINE_H */