xref: /linux/tools/perf/util/symbol_conf.h (revision 5c8edd351d1f48f1534260220d5fd4568f423c17)
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 enum symbol__weight_mode {
31 	WEIGHT_NONE = 0,
32 	WEIGHT_WEIGHT,
33 	WEIGHT_INSNLAT,
34 	WEIGHT_WEIGHT3,
35 };
36 
37 #define for_each_weight(_weight) \
38 	for ((_weight) = WEIGHT_WEIGHT; (_weight) <= WEIGHT_WEIGHT3; (_weight)++)
39 
40 struct symbol_conf {
41 	bool		hybrid_merge;
42 	/* Was hybrid_merge given on the command line rather than in a config file? */
43 	bool		hybrid_merge_set;
44 	bool		nanosecs;
45 	unsigned short	priv_size;
46 	bool		try_vmlinux_path,
47 			init_annotation,
48 			force,
49 			ignore_vmlinux,
50 			ignore_vmlinux_buildid,
51 			show_kernel_path,
52 			use_modules,
53 			allow_aliases,
54 			show_nr_samples,
55 			show_total_period,
56 			use_callchain,
57 			cumulate_callchain,
58 			show_branchflag_count,
59 			exclude_other,
60 			show_cpu_utilization,
61 			initialized,
62 			kptr_restrict,
63 			event_group,
64 			demangle,
65 			demangle_kernel,
66 			filter_relative,
67 			show_hist_headers,
68 			has_filter,
69 			show_ref_callgraph,
70 			hide_unresolved,
71 			raw_trace,
72 			report_hierarchy,
73 			report_block,
74 			report_individual_block,
75 			inline_name,
76 			addr2line_disable_warn,
77 			no_buildid_mmap2,
78 			guest_code,
79 			lazy_load_kernel_maps,
80 			keep_exited_threads,
81 			annotate_data_member,
82 			annotate_data_sample,
83 			skip_empty,
84 			enable_latency,
85 			prefer_latency,
86 			annotate_weight;
87 	const char	*vmlinux_name,
88 			*kallsyms_name,
89 			*source_prefix,
90 			*field_sep,
91 			*graph_function;
92 	const char	*default_guest_vmlinux_name,
93 			*default_guest_kallsyms,
94 			*default_guest_modules;
95 	const char	*guestmount;
96 	const char	*dso_list_str,
97 			*comm_list_str,
98 			*pid_list_str,
99 			*tid_list_str,
100 			*sym_list_str,
101 			*parallelism_list_str,
102 			*col_width_list_str,
103 			*bt_stop_list_str;
104 	const char		*addr2line_path;
105 	enum a2l_style	addr2line_style[MAX_A2L_STYLE];
106 	int             addr2line_timeout_ms;
107 	enum unwind_style unwind_style[MAX_UNWIND_STYLE];
108 	unsigned long	time_quantum;
109        struct strlist	*dso_list,
110 			*comm_list,
111 			*sym_list,
112 			*dso_from_list,
113 			*dso_to_list,
114 			*sym_from_list,
115 			*sym_to_list,
116 			*bt_stop_list;
117 	struct intlist	*pid_list,
118 			*tid_list,
119 			*addr_list;
120 	const char	*symfs;
121 	bool		symfs_layout_flat;
122 	int		res_sample;
123 	int		pad_output_len_dso;
124 	int		group_sort_idx;
125 	int		addr_range;
126 	DECLARE_BITMAP(parallelism_filter, MAX_NR_CPUS + 1);
127 };
128 
129 extern struct symbol_conf symbol_conf;
130 
131 #endif // __PERF_SYMBOL_CONF
132