Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf symbols: Move symbol_conf to separate file

So that we don't drag all the headers included in symbol.h when needing
to access symbol_conf in another header, such as annotate.h.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-rvo9dzflkneqmprb0dgbfybx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+74 -63
+1 -63
tools/perf/util/symbol.h
··· 15 15 #include "build-id.h" 16 16 #include "event.h" 17 17 #include "path.h" 18 + #include "symbol_conf.h" 18 19 19 20 #ifdef HAVE_LIBELF_SUPPORT 20 21 #include <libelf.h> ··· 89 88 90 89 struct strlist; 91 90 struct intlist; 92 - 93 - struct symbol_conf { 94 - unsigned short priv_size; 95 - bool try_vmlinux_path, 96 - init_annotation, 97 - force, 98 - ignore_vmlinux, 99 - ignore_vmlinux_buildid, 100 - show_kernel_path, 101 - use_modules, 102 - allow_aliases, 103 - sort_by_name, 104 - show_nr_samples, 105 - show_total_period, 106 - use_callchain, 107 - cumulate_callchain, 108 - show_branchflag_count, 109 - exclude_other, 110 - show_cpu_utilization, 111 - initialized, 112 - kptr_restrict, 113 - event_group, 114 - demangle, 115 - demangle_kernel, 116 - filter_relative, 117 - show_hist_headers, 118 - branch_callstack, 119 - has_filter, 120 - show_ref_callgraph, 121 - hide_unresolved, 122 - raw_trace, 123 - report_hierarchy, 124 - inline_name; 125 - const char *vmlinux_name, 126 - *kallsyms_name, 127 - *source_prefix, 128 - *field_sep, 129 - *graph_function; 130 - const char *default_guest_vmlinux_name, 131 - *default_guest_kallsyms, 132 - *default_guest_modules; 133 - const char *guestmount; 134 - const char *dso_list_str, 135 - *comm_list_str, 136 - *pid_list_str, 137 - *tid_list_str, 138 - *sym_list_str, 139 - *col_width_list_str, 140 - *bt_stop_list_str; 141 - struct strlist *dso_list, 142 - *comm_list, 143 - *sym_list, 144 - *dso_from_list, 145 - *dso_to_list, 146 - *sym_from_list, 147 - *sym_to_list, 148 - *bt_stop_list; 149 - struct intlist *pid_list, 150 - *tid_list; 151 - const char *symfs; 152 - }; 153 - 154 - extern struct symbol_conf symbol_conf; 155 91 156 92 struct symbol_name_rb_node { 157 93 struct rb_node rb_node;
+73
tools/perf/util/symbol_conf.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __PERF_SYMBOL_CONF 3 + #define __PERF_SYMBOL_CONF 1 4 + 5 + #include <stdbool.h> 6 + 7 + struct strlist; 8 + struct intlist; 9 + 10 + struct symbol_conf { 11 + unsigned short priv_size; 12 + bool try_vmlinux_path, 13 + init_annotation, 14 + force, 15 + ignore_vmlinux, 16 + ignore_vmlinux_buildid, 17 + show_kernel_path, 18 + use_modules, 19 + allow_aliases, 20 + sort_by_name, 21 + show_nr_samples, 22 + show_total_period, 23 + use_callchain, 24 + cumulate_callchain, 25 + show_branchflag_count, 26 + exclude_other, 27 + show_cpu_utilization, 28 + initialized, 29 + kptr_restrict, 30 + event_group, 31 + demangle, 32 + demangle_kernel, 33 + filter_relative, 34 + show_hist_headers, 35 + branch_callstack, 36 + has_filter, 37 + show_ref_callgraph, 38 + hide_unresolved, 39 + raw_trace, 40 + report_hierarchy, 41 + inline_name; 42 + const char *vmlinux_name, 43 + *kallsyms_name, 44 + *source_prefix, 45 + *field_sep, 46 + *graph_function; 47 + const char *default_guest_vmlinux_name, 48 + *default_guest_kallsyms, 49 + *default_guest_modules; 50 + const char *guestmount; 51 + const char *dso_list_str, 52 + *comm_list_str, 53 + *pid_list_str, 54 + *tid_list_str, 55 + *sym_list_str, 56 + *col_width_list_str, 57 + *bt_stop_list_str; 58 + struct strlist *dso_list, 59 + *comm_list, 60 + *sym_list, 61 + *dso_from_list, 62 + *dso_to_list, 63 + *sym_from_list, 64 + *sym_to_list, 65 + *bt_stop_list; 66 + struct intlist *pid_list, 67 + *tid_list; 68 + const char *symfs; 69 + }; 70 + 71 + extern struct symbol_conf symbol_conf; 72 + 73 + #endif // __PERF_SYMBOL_CONF