diff options
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 713b0b40cc4a..242de0101a86 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -62,7 +62,7 @@ struct symbol { | |||
62 | char name[0]; | 62 | char name[0]; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | void symbol__delete(struct symbol *self); | 65 | void symbol__delete(struct symbol *sym); |
66 | 66 | ||
67 | struct strlist; | 67 | struct strlist; |
68 | 68 | ||
@@ -96,9 +96,9 @@ struct symbol_conf { | |||
96 | 96 | ||
97 | extern struct symbol_conf symbol_conf; | 97 | extern struct symbol_conf symbol_conf; |
98 | 98 | ||
99 | static inline void *symbol__priv(struct symbol *self) | 99 | static inline void *symbol__priv(struct symbol *sym) |
100 | { | 100 | { |
101 | return ((void *)self) - symbol_conf.priv_size; | 101 | return ((void *)sym) - symbol_conf.priv_size; |
102 | } | 102 | } |
103 | 103 | ||
104 | struct ref_reloc_sym { | 104 | struct ref_reloc_sym { |
@@ -155,43 +155,45 @@ struct dso { | |||
155 | 155 | ||
156 | struct dso *dso__new(const char *name); | 156 | struct dso *dso__new(const char *name); |
157 | struct dso *dso__new_kernel(const char *name); | 157 | struct dso *dso__new_kernel(const char *name); |
158 | void dso__delete(struct dso *self); | 158 | void dso__delete(struct dso *dso); |
159 | 159 | ||
160 | int dso__name_len(const struct dso *self); | 160 | int dso__name_len(const struct dso *dso); |
161 | 161 | ||
162 | bool dso__loaded(const struct dso *self, enum map_type type); | 162 | bool dso__loaded(const struct dso *dso, enum map_type type); |
163 | bool dso__sorted_by_name(const struct dso *self, enum map_type type); | 163 | bool dso__sorted_by_name(const struct dso *dso, enum map_type type); |
164 | 164 | ||
165 | static inline void dso__set_loaded(struct dso *self, enum map_type type) | 165 | static inline void dso__set_loaded(struct dso *dso, enum map_type type) |
166 | { | 166 | { |
167 | self->loaded |= (1 << type); | 167 | dso->loaded |= (1 << type); |
168 | } | 168 | } |
169 | 169 | ||
170 | void dso__sort_by_name(struct dso *self, enum map_type type); | 170 | void dso__sort_by_name(struct dso *dso, enum map_type type); |
171 | 171 | ||
172 | struct dso *__dsos__findnew(struct list_head *head, const char *name); | 172 | struct dso *__dsos__findnew(struct list_head *head, const char *name); |
173 | 173 | ||
174 | int dso__load(struct dso *self, struct map *map, symbol_filter_t filter); | 174 | int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter); |
175 | int dso__load_vmlinux(struct dso *self, struct map *map, | 175 | int dso__load_vmlinux(struct dso *dso, struct map *map, |
176 | const char *vmlinux, symbol_filter_t filter); | 176 | const char *vmlinux, symbol_filter_t filter); |
177 | int dso__load_vmlinux_path(struct dso *self, struct map *map, | 177 | int dso__load_vmlinux_path(struct dso *dso, struct map *map, |
178 | symbol_filter_t filter); | 178 | symbol_filter_t filter); |
179 | int dso__load_kallsyms(struct dso *self, const char *filename, struct map *map, | 179 | int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map, |
180 | symbol_filter_t filter); | 180 | symbol_filter_t filter); |
181 | int machine__load_kallsyms(struct machine *self, const char *filename, | 181 | int machine__load_kallsyms(struct machine *machine, const char *filename, |
182 | enum map_type type, symbol_filter_t filter); | 182 | enum map_type type, symbol_filter_t filter); |
183 | int machine__load_vmlinux_path(struct machine *self, enum map_type type, | 183 | int machine__load_vmlinux_path(struct machine *machine, enum map_type type, |
184 | symbol_filter_t filter); | 184 | symbol_filter_t filter); |
185 | 185 | ||
186 | size_t __dsos__fprintf(struct list_head *head, FILE *fp); | 186 | size_t __dsos__fprintf(struct list_head *head, FILE *fp); |
187 | 187 | ||
188 | size_t machine__fprintf_dsos_buildid(struct machine *self, FILE *fp, bool with_hits); | 188 | size_t machine__fprintf_dsos_buildid(struct machine *machine, |
189 | size_t machines__fprintf_dsos(struct rb_root *self, FILE *fp); | 189 | FILE *fp, bool with_hits); |
190 | size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_hits); | 190 | size_t machines__fprintf_dsos(struct rb_root *machines, FILE *fp); |
191 | 191 | size_t machines__fprintf_dsos_buildid(struct rb_root *machines, | |
192 | size_t dso__fprintf_buildid(struct dso *self, FILE *fp); | 192 | FILE *fp, bool with_hits); |
193 | size_t dso__fprintf_symbols_by_name(struct dso *self, enum map_type type, FILE *fp); | 193 | size_t dso__fprintf_buildid(struct dso *dso, FILE *fp); |
194 | size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp); | 194 | size_t dso__fprintf_symbols_by_name(struct dso *dso, |
195 | enum map_type type, FILE *fp); | ||
196 | size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp); | ||
195 | 197 | ||
196 | enum symtab_type { | 198 | enum symtab_type { |
197 | SYMTAB__KALLSYMS = 0, | 199 | SYMTAB__KALLSYMS = 0, |
@@ -207,34 +209,36 @@ enum symtab_type { | |||
207 | SYMTAB__NOT_FOUND, | 209 | SYMTAB__NOT_FOUND, |
208 | }; | 210 | }; |
209 | 211 | ||
210 | char dso__symtab_origin(const struct dso *self); | 212 | char dso__symtab_origin(const struct dso *dso); |
211 | void dso__set_long_name(struct dso *self, char *name); | 213 | void dso__set_long_name(struct dso *dso, char *name); |
212 | void dso__set_build_id(struct dso *self, void *build_id); | 214 | void dso__set_build_id(struct dso *dso, void *build_id); |
213 | void dso__read_running_kernel_build_id(struct dso *self, struct machine *machine); | 215 | void dso__read_running_kernel_build_id(struct dso *dso, |
214 | struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr); | 216 | struct machine *machine); |
215 | struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type, | 217 | struct symbol *dso__find_symbol(struct dso *dso, enum map_type type, |
218 | u64 addr); | ||
219 | struct symbol *dso__find_symbol_by_name(struct dso *dso, enum map_type type, | ||
216 | const char *name); | 220 | const char *name); |
217 | 221 | ||
218 | int filename__read_build_id(const char *filename, void *bf, size_t size); | 222 | int filename__read_build_id(const char *filename, void *bf, size_t size); |
219 | int sysfs__read_build_id(const char *filename, void *bf, size_t size); | 223 | int sysfs__read_build_id(const char *filename, void *bf, size_t size); |
220 | bool __dsos__read_build_ids(struct list_head *head, bool with_hits); | 224 | bool __dsos__read_build_ids(struct list_head *head, bool with_hits); |
221 | int build_id__sprintf(const u8 *self, int len, char *bf); | 225 | int build_id__sprintf(const u8 *build_id, int len, char *bf); |
222 | int kallsyms__parse(const char *filename, void *arg, | 226 | int kallsyms__parse(const char *filename, void *arg, |
223 | int (*process_symbol)(void *arg, const char *name, | 227 | int (*process_symbol)(void *arg, const char *name, |
224 | char type, u64 start, u64 end)); | 228 | char type, u64 start, u64 end)); |
225 | 229 | ||
226 | void machine__destroy_kernel_maps(struct machine *self); | 230 | void machine__destroy_kernel_maps(struct machine *machine); |
227 | int __machine__create_kernel_maps(struct machine *self, struct dso *kernel); | 231 | int __machine__create_kernel_maps(struct machine *machine, struct dso *kernel); |
228 | int machine__create_kernel_maps(struct machine *self); | 232 | int machine__create_kernel_maps(struct machine *machine); |
229 | 233 | ||
230 | int machines__create_kernel_maps(struct rb_root *self, pid_t pid); | 234 | int machines__create_kernel_maps(struct rb_root *machines, pid_t pid); |
231 | int machines__create_guest_kernel_maps(struct rb_root *self); | 235 | int machines__create_guest_kernel_maps(struct rb_root *machines); |
232 | void machines__destroy_guest_kernel_maps(struct rb_root *self); | 236 | void machines__destroy_guest_kernel_maps(struct rb_root *machines); |
233 | 237 | ||
234 | int symbol__init(void); | 238 | int symbol__init(void); |
235 | void symbol__exit(void); | 239 | void symbol__exit(void); |
236 | bool symbol_type__is_a(char symbol_type, enum map_type map_type); | 240 | bool symbol_type__is_a(char symbol_type, enum map_type map_type); |
237 | 241 | ||
238 | size_t machine__fprintf_vmlinux_path(struct machine *self, FILE *fp); | 242 | size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp); |
239 | 243 | ||
240 | #endif /* __PERF_SYMBOL */ | 244 | #endif /* __PERF_SYMBOL */ |