Lines Matching defs:dso
29 static bool dso__build_id_equal(const struct dso *self, u8 *build_id);
31 static void dsos__add(struct list_head *head, struct dso *dso);
32 static struct map *map__new2(u64 start, struct dso *dso, enum map_type type);
33 static int dso__load_kernel_sym(struct dso *self, struct map *map,
35 static int dso__load_guest_kernel_sym(struct dso *self, struct map *map,
46 int dso__name_len(const struct dso *self)
54 bool dso__loaded(const struct dso *self, enum map_type type)
59 bool dso__sorted_by_name(const struct dso *self, enum map_type type)
64 static void dso__set_sorted_by_name(struct dso *self, enum map_type type)
172 void dso__set_long_name(struct dso *self, char *name)
180 static void dso__set_short_name(struct dso *self, const char *name)
188 static void dso__set_basename(struct dso *self)
193 struct dso *dso__new(const char *name)
195 struct dso *self = calloc(1, sizeof(*self) + strlen(name) + 1);
229 void dso__delete(struct dso *self)
241 void dso__set_build_id(struct dso *self, void *build_id)
349 struct symbol *dso__find_symbol(struct dso *self,
355 struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type,
361 void dso__sort_by_name(struct dso *self, enum map_type type)
383 size_t dso__fprintf_buildid(struct dso *self, FILE *fp)
391 size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp)
394 size_t ret = fprintf(fp, "dso: %s (", self->short_name);
458 struct dso *dso;
474 struct rb_root *root = &a->dso->symbols[a->map->type];
496 * Loads the function entries in /proc/kallsyms into kernel_map->dso,
500 static int dso__load_all_kallsyms(struct dso *self, const char *filename,
503 struct process_kallsyms_args args = { .map = map, .dso = self, };
512 static int dso__split_kallsyms(struct dso *self, struct map *map,
537 if (strcmp(curr_map->dso->short_name, module)) {
548 dso__set_loaded(curr_map->dso,
563 if (curr_map->dso->loaded &&
575 struct dso *dso;
586 dso = dso__new(dso_name);
587 if (dso == NULL)
590 dso->kernel = self->kernel;
592 curr_map = map__new2(pos->start, dso, map->type);
594 dso__delete(dso);
609 symbols__insert(&curr_map->dso->symbols[curr_map->type], pos);
618 dso__set_loaded(curr_map->dso, curr_map->type);
624 int dso__load_kallsyms(struct dso *self, const char *filename,
639 static int dso__load_perf_map(struct dso *self, struct map *map,
801 * And always look at the original dso, not at debuginfo packages, that
804 static int dso__synthesize_plt_symbols(struct dso *self, struct map *map,
981 static int dso__load_sym(struct dso *self, struct map *map, const char *name,
987 struct dso *curr_dso = self;
1151 curr_dso = curr_map->dso;
1206 static bool dso__build_id_equal(const struct dso *self, u8 *build_id)
1214 struct dso *pos;
1369 char dso__symtab_origin(const struct dso *self)
1389 int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
1519 if (map->dso && strcmp(map->dso->short_name, name) == 0)
1526 static int dso__kernel_module_get_build_id(struct dso *self,
1602 dso__set_long_name(map->dso, long_name);
1603 map->dso->lname_alloc = 1;
1604 dso__kernel_module_get_build_id(map->dso, "");
1661 static struct map *map__new2(u64 start, struct dso *dso, enum map_type type)
1664 (dso->kernel ? sizeof(struct kmap) : 0)));
1669 map__init(self, type, start, 0, 0, dso);
1679 struct dso *dso = __dsos__findnew(&self->kernel_dsos, filename);
1681 if (dso == NULL)
1684 map = map__new2(start, dso, MAP__FUNCTION);
1689 dso->origin = DSO__ORIG_KMODULE;
1691 dso->origin = DSO__ORIG_GUEST_KMODULE;
1747 dso__kernel_module_get_build_id(map->dso, self->root_dir);
1761 static int dso__load_vmlinux(struct dso *self, struct map *map,
1780 int dso__load_vmlinux_path(struct dso *self, struct map *map,
1810 static int dso__load_kernel_sym(struct dso *self, struct map *map,
1911 static int dso__load_guest_kernel_sym(struct dso *self, struct map *map,
1962 static void dsos__add(struct list_head *head, struct dso *dso)
1964 list_add_tail(&dso->node, head);
1967 static struct dso *dsos__find(struct list_head *head, const char *name)
1969 struct dso *pos;
1977 struct dso *__dsos__findnew(struct list_head *head, const char *name)
1979 struct dso *dso = dsos__find(head, name);
1981 if (!dso) {
1982 dso = dso__new(name);
1983 if (dso != NULL) {
1984 dsos__add(head, dso);
1985 dso__set_basename(dso);
1989 return dso;
1994 struct dso *pos;
2023 struct dso *pos;
2053 struct dso *dso__new_kernel(const char *name)
2055 struct dso *self = dso__new(name ?: "[kernel.kallsyms]");
2065 static struct dso *dso__new_guest_kernel(struct machine *machine,
2069 struct dso *self = dso__new(name ?: machine__mmap_name(machine, bf, sizeof(bf)));
2079 void dso__read_running_kernel_build_id(struct dso *self, struct machine *machine)
2091 static struct dso *machine__create_kernel(struct machine *self)
2094 struct dso *kernel;
2112 int __machine__create_kernel_maps(struct machine *self, struct dso *kernel)
2166 struct dso *kernel = machine__create_kernel(self);
2240 struct dso *kdso = self->vmlinux_maps[MAP__FUNCTION]->dso;
2288 symbol_conf.dso_list_str, "dso") < 0)
2432 int ret = dso__load_kallsyms(map->dso, filename, map, filter);
2435 dso__set_loaded(map->dso, type);
2451 int ret = dso__load_vmlinux_path(map->dso, map, filter);
2454 dso__set_loaded(map->dso, type);