xref: /linux/tools/perf/util/symbol_conf.h (revision 4248ae6e799605b3e62855be6085935d89de50d1)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_SYMBOL_CONF
3 #define __PERF_SYMBOL_CONF 1
4 
5 #include <stdbool.h>
6 #include <linux/bitmap.h>
7 #include "perf.h"
8 
9 struct strlist;
10 struct intlist;
11 
12 enum unwind_style {
13 	UNWIND_STYLE_UNKNOWN = 0,
14 	UNWIND_STYLE_LIBDW,
15 	UNWIND_STYLE_LIBUNWIND,
16 };
17 
18 #define MAX_UNWIND_STYLE (UNWIND_STYLE_LIBUNWIND + 1)
19 
20 
21 enum a2l_style {
22 	A2L_STYLE_UNKNOWN = 0,
23 	A2L_STYLE_LIBDW,
24 	A2L_STYLE_LLVM,
25 	A2L_STYLE_LIBBFD,
26 	A2L_STYLE_CMD,
27 };
28 #define MAX_A2L_STYLE (A2L_STYLE_CMD + 1)
29 
30 struct symbol_conf {
31 	bool		nanosecs;
32 	unsigned short	priv_size;
33 	bool		try_vmlinux_path,
34 			init_annotation,
35 			force,
36 			ignore_vmlinux,
37 			ignore_vmlinux_buildid,
38 			show_kernel_path,
39 			use_modules,
40 			allow_aliases,
41 			show_nr_samples,
42 			show_total_period,
43 			use_callchain,
44 			cumulate_callchain,
45 			show_branchflag_count,
46 			exclude_other,
47 			show_cpu_utilization,
48 			initialized,
49 			kptr_restrict,
50 			event_group,
51 			demangle,
52 			demangle_kernel,
53 			filter_relative,
54 			show_hist_headers,
55 			has_filter,
56 			show_ref_callgraph,
57 			hide_unresolved,
58 			raw_trace,
59 			report_hierarchy,
60 			report_block,
61 			report_individual_block,
62 			inline_name,
63 			addr2line_disable_warn,
64 			no_buildid_mmap2,
65 			guest_code,
66 			lazy_load_kernel_maps,
67 			keep_exited_threads,
68 			annotate_data_member,
69 			annotate_data_sample,
70 			skip_empty,
71 			enable_latency,
72 			prefer_latency;
73 	const char	*vmlinux_name,
74 			*kallsyms_name,
75 			*source_prefix,
76 			*field_sep,
77 			*graph_function;
78 	const char	*default_guest_vmlinux_name,
79 			*default_guest_kallsyms,
80 			*default_guest_modules;
81 	const char	*guestmount;
82 	const char	*dso_list_str,
83 			*comm_list_str,
84 			*pid_list_str,
85 			*tid_list_str,
86 			*sym_list_str,
87 			*parallelism_list_str,
88 			*col_width_list_str,
89 			*bt_stop_list_str;
90 	const char		*addr2line_path;
91 	enum a2l_style	addr2line_style[MAX_A2L_STYLE];
92 	int             addr2line_timeout_ms;
93 	enum unwind_style unwind_style[MAX_UNWIND_STYLE];
94 	unsigned long	time_quantum;
95        struct strlist	*dso_list,
96 			*comm_list,
97 			*sym_list,
98 			*dso_from_list,
99 			*dso_to_list,
100 			*sym_from_list,
101 			*sym_to_list,
102 			*bt_stop_list;
103 	struct intlist	*pid_list,
104 			*tid_list,
105 			*addr_list;
106 	const char	*symfs;
107 	bool		symfs_layout_flat;
108 	int		res_sample;
109 	int		pad_output_len_dso;
110 	int		group_sort_idx;
111 	int		addr_range;
112 	DECLARE_BITMAP(parallelism_filter, MAX_NR_CPUS + 1);
113 };
114 
115 extern struct symbol_conf symbol_conf;
116 
117 #endif // __PERF_SYMBOL_CONF
118