Lines Matching refs:nr_maps
190 size_t nr_maps; member
579 int i, map_idx, map_def_sz, nr_maps = 0; in bpf_object__init_maps() local
612 nr_maps++; in bpf_object__init_maps()
617 nr_maps, data->d_size); in bpf_object__init_maps()
619 if (!nr_maps) in bpf_object__init_maps()
623 map_def_sz = data->d_size / nr_maps; in bpf_object__init_maps()
624 if (!data->d_size || (data->d_size % nr_maps) != 0) { in bpf_object__init_maps()
627 obj->path, nr_maps, data->d_size); in bpf_object__init_maps()
631 obj->maps = calloc(nr_maps, sizeof(obj->maps[0])); in bpf_object__init_maps()
636 obj->nr_maps = nr_maps; in bpf_object__init_maps()
643 for (i = 0; i < nr_maps; i++) in bpf_object__init_maps()
709 qsort(obj->maps, obj->nr_maps, sizeof(obj->maps[0]), compare_bpf_map); in bpf_object__init_maps()
900 size_t nr_maps = obj->nr_maps; in bpf_program__collect_reloc() local
965 for (map_idx = 0; map_idx < nr_maps; map_idx++) { in bpf_program__collect_reloc()
973 if (map_idx >= nr_maps) { in bpf_program__collect_reloc()
975 (int)map_idx, (int)nr_maps - 1); in bpf_program__collect_reloc()
1112 for (i = 0; i < obj->nr_maps; i++) { in bpf_object__create_maps()
1607 for (i = 0; i < obj->nr_maps; i++) in bpf_object__unload()
1849 for (i = 0; i < obj->nr_maps; i++) { in bpf_object__close()
1858 obj->nr_maps = 0; in bpf_object__close()
2232 e = obj->maps + obj->nr_maps; in bpf_map__next()
2244 if (idx >= obj->nr_maps) in bpf_map__next()
2266 for (i = 0; i < obj->nr_maps; i++) { in bpf_object__find_map_by_offset()