]> Git Repo - linux.git/blame - tools/perf/util/srcline.h
Linux 6.14-rc3
[linux.git] / tools / perf / util / srcline.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
632a5cab
ACM
2#ifndef PERF_SRCLINE_H
3#define PERF_SRCLINE_H
4
5#include <linux/list.h>
11ea2515 6#include <linux/rbtree.h>
632a5cab
ACM
7#include <linux/types.h>
8
9struct dso;
10struct symbol;
11
701677b9 12extern int addr2line_timeout_ms;
632a5cab
ACM
13extern bool srcline_full_filename;
14char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
935f5a9d 15 bool show_sym, bool show_addr, u64 ip);
632a5cab 16char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
935f5a9d
JY
17 bool show_sym, bool show_addr, bool unwind_inlines,
18 u64 ip);
625db36e 19void zfree_srcline(char **srcline);
dd2e18e9 20char *get_srcline_split(struct dso *dso, u64 addr, unsigned *line);
632a5cab 21
21ac9d54 22/* insert the srcline into the DSO, which will take ownership */
55ecd631 23void srcline__tree_insert(struct rb_root_cached *tree, u64 addr, char *srcline);
21ac9d54 24/* find previously inserted srcline */
55ecd631 25char *srcline__tree_find(struct rb_root_cached *tree, u64 addr);
21ac9d54 26/* delete all srclines within the tree */
55ecd631 27void srcline__tree_delete(struct rb_root_cached *tree);
21ac9d54 28
922db21d
ACM
29extern char *srcline__unknown;
30#define SRCLINE_UNKNOWN srcline__unknown
632a5cab
ACM
31
32struct inline_list {
fea0cf84 33 struct symbol *symbol;
2be8832f 34 char *srcline;
632a5cab
ACM
35 struct list_head list;
36};
37
38struct inline_node {
39 u64 addr;
40 struct list_head val;
11ea2515 41 struct rb_node rb_node;
632a5cab
ACM
42};
43
fea0cf84
MW
44/* parse inlined frames for the given address */
45struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
46 struct symbol *sym);
47/* free resources associated to the inline node list */
632a5cab
ACM
48void inline_node__delete(struct inline_node *node);
49
11ea2515 50/* insert the inline node list into the DSO, which will take ownership */
55ecd631
DB
51void inlines__tree_insert(struct rb_root_cached *tree,
52 struct inline_node *inlines);
11ea2515 53/* find previously inserted inline node list */
55ecd631 54struct inline_node *inlines__tree_find(struct rb_root_cached *tree, u64 addr);
11ea2515 55/* delete all nodes within the tree of inline_node s */
55ecd631 56void inlines__tree_delete(struct rb_root_cached *tree);
11ea2515 57
632a5cab 58#endif /* PERF_SRCLINE_H */
This page took 0.528067 seconds and 5 git commands to generate.