Lines Matching defs:maps
260 void maps__fixup_end(struct maps *maps)
264 down_write(&maps->lock);
266 maps__for_each_entry(maps, curr) {
280 up_write(&maps->lock);
732 * map__split_kallsyms, when we have split the maps per module
749 static int maps__split_kallsyms_for_kcore(struct maps *kmaps, struct dso *dso)
798 * Split the symbols into maps, making sure there are no overlaps, i.e. the
799 * kernel range is broken in several maps, named [kernel].N, as we don't have
802 static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
871 * trampoline maps refer to the text section and it's
1100 static int do_validate_kcore_modules(const char *filename, struct maps *kmaps)
1157 struct maps *kmaps = map__kmaps(map);
1196 struct list_head maps;
1211 list_add(&map->node, &md->maps);
1217 * Merges map into maps by splitting the new map within the existing map
1220 int maps__merge_in(struct maps *kmaps, struct map *new_map)
1298 struct maps *kmaps = map__kmaps(map);
1325 INIT_LIST_HEAD(&md.maps);
1334 /* Read new maps into temporary lists */
1341 if (list_empty(&md.maps)) {
1346 /* Remove old maps */
1349 * We need to preserve eBPF maps even if they are
1360 list_for_each_entry(new_map, &md.maps, node) {
1369 replacement_map = list_entry(md.maps.next, struct map, node);
1371 /* Add new maps */
1372 while (!list_empty(&md.maps)) {
1373 new_map = list_entry(md.maps.next, struct map, node);
1381 /* Ensure maps are correctly ordered */
1389 * Merge kcore map into existing maps,
1390 * and ensure that current maps (eBPF)
1403 * entry trampoline maps are too.
1431 while (!list_empty(&md.maps)) {
1432 map = list_entry(md.maps.next, struct map, node);
1967 void __maps__sort_by_name(struct maps *maps)
1969 qsort(maps->maps_by_name, maps->nr_maps, sizeof(struct map *), map__strcmp);
1972 static int map__groups__sort_by_name_from_rbtree(struct maps *maps)
1975 struct map **maps_by_name = realloc(maps->maps_by_name, maps->nr_maps * sizeof(map));
1981 maps->maps_by_name = maps_by_name;
1982 maps->nr_maps_allocated = maps->nr_maps;
1984 maps__for_each_entry(maps, map)
1987 __maps__sort_by_name(maps);
1991 static struct map *__maps__find_by_name(struct maps *maps, const char *name)
1995 if (maps->maps_by_name == NULL &&
1996 map__groups__sort_by_name_from_rbtree(maps))
1999 mapp = bsearch(name, maps->maps_by_name, maps->nr_maps, sizeof(*mapp), map__strcmp_name);
2005 struct map *maps__find_by_name(struct maps *maps, const char *name)
2009 down_read(&maps->lock);
2011 if (maps->last_search_by_name && strcmp(maps->last_search_by_name->dso->short_name, name) == 0) {
2012 map = maps->last_search_by_name;
2016 * If we have maps->maps_by_name, then the name isn't in the rbtree,
2017 * as maps->maps_by_name mirrors the rbtree when lookups by name are
2020 map = __maps__find_by_name(maps, name);
2021 if (map || maps->maps_by_name != NULL)
2025 maps__for_each_entry(maps, map)
2027 maps->last_search_by_name = map;
2034 up_read(&maps->lock);
2170 * /proc/kcore or module maps don't match to /proc/kallsyms.