/tools/perf/util/ |
D | maps.h | 15 struct maps; 18 struct map *maps__find(struct maps *maps, u64 addr); 19 struct map *maps__first(struct maps *maps); 22 #define maps__for_each_entry(maps, map) \ argument 23 for (map = maps__first(maps); map; map = map__next(map)) 25 #define maps__for_each_entry_safe(maps, map, next) \ argument 26 for (map = maps__first(maps), next = map__next(map); map; map = next, next = map__next(map)) 28 struct maps { struct 47 struct maps *kmaps; argument 51 struct maps *maps__new(struct machine *machine); [all …]
|
D | unwind.h | 9 struct maps; 21 int (*prepare_access)(struct maps *maps); 22 void (*flush_access)(struct maps *maps); 23 void (*finish_access)(struct maps *maps); 48 int unwind__prepare_access(struct maps *maps, struct map *map, bool *initialized); 49 void unwind__flush_access(struct maps *maps); 50 void unwind__finish_access(struct maps *maps); 52 static inline int unwind__prepare_access(struct maps *maps __maybe_unused, in unwind__prepare_access() 59 static inline void unwind__flush_access(struct maps *maps __maybe_unused) {} in unwind__flush_access() 60 static inline void unwind__finish_access(struct maps *maps __maybe_unused) {} in unwind__finish_access() [all …]
|
D | unwind-libunwind.c | 15 static void unwind__register_ops(struct maps *maps, struct unwind_libunwind_ops *ops) in unwind__register_ops() argument 17 maps->unwind_libunwind_ops = ops; in unwind__register_ops() 20 int unwind__prepare_access(struct maps *maps, struct map *map, bool *initialized) in unwind__prepare_access() argument 30 if (maps->addr_space) { in unwind__prepare_access() 39 if (!maps->machine->env || !maps->machine->env->arch) in unwind__prepare_access() 42 dso_type = dso__type(map->dso, maps->machine); in unwind__prepare_access() 46 arch = perf_env__arch(maps->machine->env); in unwind__prepare_access() 61 unwind__register_ops(maps, ops); in unwind__prepare_access() 63 err = maps->unwind_libunwind_ops->prepare_access(maps); in unwind__prepare_access() 69 void unwind__flush_access(struct maps *maps) in unwind__flush_access() argument [all …]
|
D | map.c | 28 static void __maps__insert(struct maps *maps, struct map *map); 523 void maps__init(struct maps *maps, struct machine *machine) in maps__init() argument 525 maps->entries = RB_ROOT; in maps__init() 526 init_rwsem(&maps->lock); in maps__init() 527 maps->machine = machine; in maps__init() 528 maps->last_search_by_name = NULL; in maps__init() 529 maps->nr_maps = 0; in maps__init() 530 maps->maps_by_name = NULL; in maps__init() 531 refcount_set(&maps->refcnt, 1); in maps__init() 534 static void __maps__free_maps_by_name(struct maps *maps) in __maps__free_maps_by_name() argument [all …]
|
D | find-map.c | 4 FILE *maps; in find_map() local 8 maps = fopen("/proc/self/maps", "r"); in find_map() 9 if (!maps) { in find_map() 14 while (!found && fgets(line, sizeof(line), maps)) { in find_map() 28 fclose(maps); in find_map()
|
D | thread.c | 27 thread->maps = maps__new(machine); in thread__init_maps() 31 thread->maps = maps__get(leader->maps); in thread__init_maps() 36 return thread->maps ? 0 : -1; in thread__init_maps() 90 if (thread->maps) { in thread__delete() 91 maps__put(thread->maps); in thread__delete() 92 thread->maps = NULL; in thread__delete() 256 unwind__flush_access(thread->maps); in ____thread__set_comm() 329 maps__fprintf(thread->maps, fp); in thread__fprintf() 336 ret = unwind__prepare_access(thread->maps, map, NULL); in thread__insert_map() 340 maps__fixup_overlappings(thread->maps, map, stderr); in thread__insert_map() [all …]
|
D | map_symbol.h | 7 struct maps; 12 struct maps *maps; member
|
D | unwind-libunwind-local.c | 581 e.ms.maps = al.maps; in entry() 619 static int _unwind__prepare_access(struct maps *maps) in _unwind__prepare_access() argument 621 maps->addr_space = unw_create_addr_space(&accessors, 0); in _unwind__prepare_access() 622 if (!maps->addr_space) { in _unwind__prepare_access() 627 unw_set_caching_policy(maps->addr_space, UNW_CACHE_GLOBAL); in _unwind__prepare_access() 631 static void _unwind__flush_access(struct maps *maps) in _unwind__flush_access() argument 633 unw_flush_cache(maps->addr_space, 0, 0); in _unwind__flush_access() 636 static void _unwind__finish_access(struct maps *maps) in _unwind__finish_access() argument 638 unw_destroy_addr_space(maps->addr_space); in _unwind__finish_access() 663 addr_space = ui->thread->maps->addr_space; in get_entries() [all …]
|
D | symbol.c | 260 void maps__fixup_end(struct maps *maps) in maps__fixup_end() argument 264 down_write(&maps->lock); in maps__fixup_end() 266 maps__for_each_entry(maps, curr) { in maps__fixup_end() 280 up_write(&maps->lock); in maps__fixup_end() 749 static int maps__split_kallsyms_for_kcore(struct maps *kmaps, struct dso *dso) in maps__split_kallsyms_for_kcore() 802 static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta, in maps__split_kallsyms() 1100 static int do_validate_kcore_modules(const char *filename, struct maps *kmaps) in do_validate_kcore_modules() 1157 struct maps *kmaps = map__kmaps(map); in validate_kcore_modules() 1196 struct list_head maps; member 1211 list_add(&map->node, &md->maps); in kcore_mapfn() [all …]
|
/tools/perf/tests/ |
D | thread-maps-share.c | 15 struct maps *maps; in test__thread_maps_share() local 19 struct maps *other_maps; in test__thread_maps_share() 45 maps = leader->maps; in test__thread_maps_share() 46 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 4); in test__thread_maps_share() 49 TEST_ASSERT_VAL("maps don't match", maps == t1->maps); in test__thread_maps_share() 50 TEST_ASSERT_VAL("maps don't match", maps == t2->maps); in test__thread_maps_share() 51 TEST_ASSERT_VAL("maps don't match", maps == t3->maps); in test__thread_maps_share() 73 other_maps = other->maps; in test__thread_maps_share() 76 TEST_ASSERT_VAL("maps don't match", other_maps == other_leader->maps); in test__thread_maps_share() 80 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 3); in test__thread_maps_share() [all …]
|
D | maps.c | 16 static int check_maps(struct map_def *merged, unsigned int size, struct maps *maps) in check_maps() argument 21 maps__for_each_entry(maps, map) { in check_maps() 38 struct maps maps; in test__maps__merge_in() local 67 maps__init(&maps, NULL); in test__maps__merge_in() 77 maps__insert(&maps, map); in test__maps__merge_in() 102 ret = maps__merge_in(&maps, map_kcore1); in test__maps__merge_in() 105 ret = check_maps(merged12, ARRAY_SIZE(merged12), &maps); in test__maps__merge_in() 108 ret = maps__merge_in(&maps, map_kcore2); in test__maps__merge_in() 111 ret = check_maps(merged12, ARRAY_SIZE(merged12), &maps); in test__maps__merge_in() 114 ret = maps__merge_in(&maps, map_kcore3); in test__maps__merge_in() [all …]
|
D | vmlinux-kallsyms.c | 24 struct maps *maps = machine__kernel_maps(&vmlinux); in test__vmlinux_matches_kallsyms() local 185 maps__for_each_entry(maps, map) { in test__vmlinux_matches_kallsyms() 209 maps__for_each_entry(maps, map) { in test__vmlinux_matches_kallsyms() 237 maps = machine__kernel_maps(&kallsyms); in test__vmlinux_matches_kallsyms() 239 maps__for_each_entry(maps, map) { in test__vmlinux_matches_kallsyms()
|
/tools/perf/arch/x86/util/ |
D | machine.c | 20 struct extra_kernel_map *maps; member 34 buf = realloc(mi->maps, sz); in add_extra_kernel_map() 37 mi->maps = buf; in add_extra_kernel_map() 40 mi->maps[mi->cnt].start = start; in add_extra_kernel_map() 41 mi->maps[mi->cnt].end = end; in add_extra_kernel_map() 42 mi->maps[mi->cnt].pgoff = pgoff; in add_extra_kernel_map() 43 strlcpy(mi->maps[mi->cnt].name, name, KMAP_NAME_LEN); in add_extra_kernel_map() 91 struct extra_kernel_map *xm = &mi.maps[i]; in machine__create_extra_kernel_maps() 101 free(mi.maps); in machine__create_extra_kernel_maps()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | btf_map_in_map.c | 71 map1_fd = bpf_map__fd(skel->maps.inner_map1); in test_lookup_update() 72 map2_fd = bpf_map__fd(skel->maps.inner_map2); in test_lookup_update() 73 map3_fd = bpf_map__fd(skel->maps.inner_map3); in test_lookup_update() 74 map4_fd = bpf_map__fd(skel->maps.inner_map4); in test_lookup_update() 75 map5_fd = bpf_map__fd(skel->maps.inner_map5); in test_lookup_update() 76 outer_arr_dyn_fd = bpf_map__fd(skel->maps.outer_arr_dyn); in test_lookup_update() 77 outer_arr_fd = bpf_map__fd(skel->maps.outer_arr); in test_lookup_update() 78 outer_hash_fd = bpf_map__fd(skel->maps.outer_hash); in test_lookup_update() 133 map1_id = bpf_map_id(skel->maps.inner_map1); in test_lookup_update() 134 map2_id = bpf_map_id(skel->maps.inner_map2); in test_lookup_update() [all …]
|
D | cg_storage_multi.c | 120 if (assert_storage(obj->maps.cgroup_storage, in test_egress_only() 124 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_egress_only() 144 if (assert_storage(obj->maps.cgroup_storage, in test_egress_only() 149 if (assert_storage(obj->maps.cgroup_storage, in test_egress_only() 205 if (assert_storage(obj->maps.cgroup_storage, in test_isolated() 210 if (assert_storage(obj->maps.cgroup_storage, in test_isolated() 215 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_isolated() 218 if (assert_storage_noexist(obj->maps.cgroup_storage, &key)) in test_isolated() 250 if (assert_storage(obj->maps.cgroup_storage, in test_isolated() 255 if (assert_storage(obj->maps.cgroup_storage, in test_isolated() [all …]
|
D | xdp_noinline.c | 38 bpf_map_update_elem(bpf_map__fd(skel->maps.vip_map), &key, &value, 0); in test_xdp_noinline() 39 bpf_map_update_elem(bpf_map__fd(skel->maps.ch_rings), &ch_key, &real_num, 0); in test_xdp_noinline() 40 bpf_map_update_elem(bpf_map__fd(skel->maps.reals), &real_num, &real_def, 0); in test_xdp_noinline() 58 bpf_map_lookup_elem(bpf_map__fd(skel->maps.stats), &stats_key, stats); in test_xdp_noinline()
|
D | stacktrace_build_id.c | 28 control_map_fd = bpf_map__fd(skel->maps.control_map); in test_stacktrace_build_id() 29 stackid_hmap_fd = bpf_map__fd(skel->maps.stackid_hmap); in test_stacktrace_build_id() 30 stackmap_fd = bpf_map__fd(skel->maps.stackmap); in test_stacktrace_build_id() 31 stack_amap_fd = bpf_map__fd(skel->maps.stack_amap); in test_stacktrace_build_id()
|
D | metadata.c | 76 bpf_map__fd(obj->maps.rodata)); in test_metadata_unused() 93 bpf_map__fd(obj->maps.rodata), NULL); in test_metadata_unused() 110 bpf_map__fd(obj->maps.rodata)); in test_metadata_used() 127 bpf_map__fd(obj->maps.rodata), NULL); in test_metadata_used()
|
D | sockmap_basic.c | 121 map = bpf_map__fd(skel->maps.sock_map); in test_skmsg_helpers() 157 src = bpf_map__fd(skel->maps.src); in test_sockmap_update() 159 dst_map = skel->maps.dst_sock_map; in test_sockmap_update() 161 dst_map = skel->maps.dst_sock_hash; in test_sockmap_update() 179 compare_cookies(skel->maps.src, dst_map); in test_sockmap_update() 214 src = skel->maps.sockmap; in test_sockmap_copy() 218 src = skel->maps.sockhash; in test_sockmap_copy() 268 compare_cookies(src, skel->maps.dst); in test_sockmap_copy()
|
D | sk_lookup.c | 678 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 686 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 695 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 705 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 714 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 722 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 730 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 739 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 749 .sock_map = skel->maps.redir_map, in test_redirect_lookup() 758 .sock_map = skel->maps.redir_map, in test_redirect_lookup() [all …]
|
D | core_retro.c | 17 err = bpf_map_update_elem(bpf_map__fd(skel->maps.exp_tgid_map), &zero, &my_pid, 0); in test_core_retro() 29 err = bpf_map_lookup_elem(bpf_map__fd(skel->maps.results), &zero, &res); in test_core_retro()
|
D | pe_preserve_elems.c | 62 test_one_map(skel->maps.array_1, skel->progs.read_array_1, false); in test_pe_preserve_elems() 63 test_one_map(skel->maps.array_2, skel->progs.read_array_2, true); in test_pe_preserve_elems()
|
/tools/testing/selftests/bpf/ |
D | test_xdp_veth.sh | 102 pinmaps $BPF_DIR/maps 103 bpftool map update pinned $BPF_DIR/maps/tx_port key 0 0 0 0 value 122 0 0 0 104 bpftool map update pinned $BPF_DIR/maps/tx_port key 1 0 0 0 value 133 0 0 0 105 bpftool map update pinned $BPF_DIR/maps/tx_port key 2 0 0 0 value 111 0 0 0
|
/tools/testing/selftests/x86/ |
D | test_vdso.c | 51 FILE *maps; in vsyscall_getcpu() local 55 maps = fopen("/proc/self/maps", "r"); in vsyscall_getcpu() 56 if (!maps) /* might still be present, but ignore it here, as we test vDSO not vsyscall */ in vsyscall_getcpu() 59 while (fgets(line, MAPS_LINE_LEN, maps)) { in vsyscall_getcpu() 77 fclose(maps); in vsyscall_getcpu()
|
/tools/bpf/bpftool/Documentation/ |
D | bpftool-map.rst | 5 tool for inspection and simple manipulation of eBPF maps 58 Show information about loaded maps. If *MAP* is specified 59 show information only about given maps, otherwise list all 60 maps currently loaded on the system. In case of **name**, 61 *MAP* may match several maps which will all be shown. 68 maps. On such kernels bpftool will automatically emit this 79 To create maps of type array-of-maps or hash-of-maps, the 81 kernel needs it to collect metadata related to the inner maps 89 *MAP* may match several maps which will all be dumped. 167 Show file names of pinned maps. [all …]
|