Home
last modified time | relevance | path

Searched refs:maps (Results 1 – 25 of 219) sorted by relevance

123456789

/tools/perf/util/
A Dmaps.h13 struct maps;
24 bool maps__empty(struct maps *maps);
25 int maps__copy_from(struct maps *maps, struct maps *parent);
27 struct maps *maps__get(struct maps *maps);
28 void maps__put(struct maps *maps);
38 bool maps__equal(struct maps *a, struct maps *b);
50 void *maps__addr_space(const struct maps *maps);
56 size_t maps__fprintf(struct maps *maps, FILE *fp);
61 struct map *maps__find(struct maps *maps, u64 addr);
77 void maps__fixup_end(struct maps *maps);
[all …]
A Dmaps.c180 refcount_t *maps__refcnt(struct maps *maps) in maps__refcnt() argument
186 void *maps__addr_space(const struct maps *maps) in maps__addr_space() argument
230 static void maps__exit(struct maps *maps) in maps__exit() argument
248 RC_STRUCT(maps) *maps = zalloc(sizeof(*maps)); in maps__new()
256 static void maps__delete(struct maps *maps) in maps__delete() argument
262 struct maps *maps__get(struct maps *maps) in maps__get() argument
272 void maps__put(struct maps *maps) in maps__put() argument
354 static int maps__sort_by_name(struct maps *maps) in maps__sort_by_name() argument
555 bool maps__empty(struct maps *maps) in maps__empty() argument
1195 void maps__fixup_end(struct maps *maps) in maps__fixup_end() argument
[all …]
A Dunwind.h9 struct maps;
21 int (*prepare_access)(struct maps *maps);
22 void (*flush_access)(struct maps *maps);
23 void (*finish_access)(struct maps *maps);
47 void unwind__flush_access(struct maps *maps);
48 void unwind__finish_access(struct maps *maps);
50 static inline int unwind__prepare_access(struct maps *maps __maybe_unused, in unwind__prepare_access()
57 static inline void unwind__flush_access(struct maps *maps __maybe_unused) {} in unwind__flush_access()
58 static inline void unwind__finish_access(struct maps *maps __maybe_unused) {} in unwind__finish_access()
72 static inline int unwind__prepare_access(struct maps *maps __maybe_unused, in unwind__prepare_access()
[all …]
A Dunwind-libunwind.c15 int unwind__prepare_access(struct maps *maps, struct map *map, bool *initialized) in unwind__prepare_access() argument
27 if (maps__addr_space(maps)) { in unwind__prepare_access()
34 machine = maps__machine(maps); in unwind__prepare_access()
58 maps__set_unwind_libunwind_ops(maps, ops); in unwind__prepare_access()
60 err = maps__unwind_libunwind_ops(maps)->prepare_access(maps); in unwind__prepare_access()
66 void unwind__flush_access(struct maps *maps) in unwind__flush_access() argument
68 const struct unwind_libunwind_ops *ops = maps__unwind_libunwind_ops(maps); in unwind__flush_access()
71 ops->flush_access(maps); in unwind__flush_access()
74 void unwind__finish_access(struct maps *maps) in unwind__finish_access() argument
76 const struct unwind_libunwind_ops *ops = maps__unwind_libunwind_ops(maps); in unwind__finish_access()
[all …]
A Dfind-map.c4 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()
A Daddr_location.c10 al->maps = NULL; in addr_location__init()
33 maps__zput(al->maps); in addr_location__exit()
39 maps__put(dst->maps); in addr_location__copy()
43 dst->maps = maps__get(src->maps); in addr_location__copy()
A Dbpf_lock_contention.c83 fd = bpf_map__fd(skel->maps.slab_caches); in run_slab_cache_iter()
321 fd = bpf_map__fd(skel->maps.cpu_filter); in lock_contention_prepare()
333 fd = bpf_map__fd(skel->maps.task_filter); in lock_contention_prepare()
345 fd = bpf_map__fd(skel->maps.task_filter); in lock_contention_prepare()
352 fd = bpf_map__fd(skel->maps.type_filter); in lock_contention_prepare()
361 fd = bpf_map__fd(skel->maps.addr_filter); in lock_contention_prepare()
377 fd = bpf_map__fd(skel->maps.lock_delays); in lock_contention_prepare()
398 fd = bpf_map__fd(skel->maps.slab_filter); in lock_contention_prepare()
494 ts_fd = bpf_map__fd(skel->maps.tstamp); in account_end_timestamp()
722 fd = bpf_map__fd(skel->maps.lock_stat); in lock_contention_read()
[all …]
A Dmap_symbol.h7 struct maps;
12 struct maps *maps; member
A Daddr_location.h8 struct maps;
14 struct maps *maps; member
/tools/tracing/rtla/src/
A Dtimerlat_bpf.c40 bpf_map__set_autocreate(bpf->maps.hist_irq, false); in timerlat_bpf_init()
41 bpf_map__set_autocreate(bpf->maps.hist_thread, false); in timerlat_bpf_init()
42 bpf_map__set_autocreate(bpf->maps.hist_user, false); in timerlat_bpf_init()
47 bpf_map__set_autocreate(bpf->maps.summary_irq, false); in timerlat_bpf_init()
117 return bpf_map__update_elem(bpf->maps.stop_tracing, in timerlat_bpf_restart_tracing()
160 return get_value(bpf->maps.hist_irq, in timerlat_bpf_get_hist_value()
161 bpf->maps.hist_thread, in timerlat_bpf_get_hist_value()
162 bpf->maps.hist_user, in timerlat_bpf_get_hist_value()
175 return get_value(bpf->maps.summary_irq, in timerlat_bpf_get_summary_value()
176 bpf->maps.summary_thread, in timerlat_bpf_get_summary_value()
[all …]
/tools/testing/selftests/mseal_system_mappings/
A Dsysmap_is_sealed.c21 bool has_mapping(char *name, FILE *maps) in has_mapping() argument
25 while (fgets(line, sizeof(line), maps)) { in has_mapping()
33 bool mapping_is_sealed(char *name, FILE *maps) in mapping_is_sealed() argument
37 while (fgets(line, sizeof(line), maps)) { in mapping_is_sealed()
50 FILE *maps; in FIXTURE() local
55 self->maps = fopen("/proc/self/smaps", "r"); in FIXTURE_SETUP()
56 if (!self->maps) in FIXTURE_SETUP()
63 if (self->maps) in FIXTURE_TEARDOWN()
64 fclose(self->maps); in FIXTURE_TEARDOWN()
110 if (!has_mapping(variant->name, self->maps)) { in TEST_F()
[all …]
/tools/perf/tests/
A Dmaps.c48 static int check_maps(struct map_def *merged, unsigned int size, struct maps *maps) in check_maps() argument
52 if (maps__nr_maps(maps) != size) { in check_maps()
60 failed = maps__for_each_map(maps, check_maps_cb, &args); in check_maps()
69 maps__for_each_map(maps, failed_cb, NULL); in check_maps()
103 struct maps *maps = maps__new(NULL); in test__maps__merge_in() local
105 TEST_ASSERT_VAL("failed to create maps", maps); in test__maps__merge_in()
140 ret = maps__merge_in(maps, map_kcore1); in test__maps__merge_in()
146 ret = maps__merge_in(maps, map_kcore2); in test__maps__merge_in()
152 ret = maps__merge_in(maps, map_kcore3); in test__maps__merge_in()
155 ret = check_maps(merged3, ARRAY_SIZE(merged3), maps); in test__maps__merge_in()
[all …]
A Dthread-maps-share.c15 struct maps *maps; in test__thread_maps_share() local
19 struct maps *other_maps; in test__thread_maps_share()
45 maps = thread__maps(leader); in test__thread_maps_share()
46 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 4); in test__thread_maps_share()
49 TEST_ASSERT_VAL("maps don't match", maps__equal(maps, thread__maps(t1))); in test__thread_maps_share()
50 TEST_ASSERT_VAL("maps don't match", maps__equal(maps, thread__maps(t2))); in test__thread_maps_share()
51 TEST_ASSERT_VAL("maps don't match", maps__equal(maps, thread__maps(t3))); in test__thread_maps_share()
80 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 3); in test__thread_maps_share()
83 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 2); in test__thread_maps_share()
86 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(maps__refcnt(maps)), 1); in test__thread_maps_share()
/tools/testing/selftests/bpf/prog_tests/
A Dsockmap_redir.c85 struct maps { struct
202 struct maps *maps, int status) in test_send_redir_recv() argument
328 struct maps *maps, struct socket_spec *s_in, in test_socket() argument
360 maps, status); in test_socket()
364 struct maps *maps) in test_redir() argument
421 struct maps maps; in test_map() local
432 maps.in = bpf_map__fd(skel->maps.nop_map); in test_map()
433 maps.out = bpf_map__fd(skel->maps.sock_map); in test_map()
436 maps.in = bpf_map__fd(skel->maps.nop_hash); in test_map()
437 maps.out = bpf_map__fd(skel->maps.sock_hash); in test_map()
[all …]
A Dbtf_map_in_map.c38 map1_fd = bpf_map__fd(skel->maps.inner_map1); in test_lookup_update()
39 map2_fd = bpf_map__fd(skel->maps.inner_map2); in test_lookup_update()
40 map3_fd = bpf_map__fd(skel->maps.inner_map3); in test_lookup_update()
41 map4_fd = bpf_map__fd(skel->maps.inner_map4); in test_lookup_update()
42 map5_fd = bpf_map__fd(skel->maps.inner_map5); in test_lookup_update()
44 outer_arr_fd = bpf_map__fd(skel->maps.outer_arr); in test_lookup_update()
45 outer_hash_fd = bpf_map__fd(skel->maps.outer_hash); in test_lookup_update()
100 map1_id = bpf_map_id(skel->maps.inner_map1); in test_lookup_update()
101 map2_id = bpf_map_id(skel->maps.inner_map2); in test_lookup_update()
118 inner_map_fd = bpf_map__fd(skel->maps.sockarr_sz2); in test_diff_size()
[all …]
A Dstruct_ops_autocreate.c42 link = bpf_map__attach_struct_ops(skel->maps.testmod_1); in check_test_1_link()
61 err = bpf_map__set_autocreate(skel->maps.testmod_2, false); in can_load_partial_object()
75 check_test_1_link(skel, skel->maps.testmod_1); in can_load_partial_object()
90 ASSERT_TRUE(bpf_map__autocreate(skel->maps.testmod_1), "testmod_1 autocreate"); in optional_maps()
91 ASSERT_TRUE(bpf_map__autocreate(skel->maps.testmod_2), "testmod_2 autocreate"); in optional_maps()
92 ASSERT_FALSE(bpf_map__autocreate(skel->maps.optional_map), "optional_map autocreate"); in optional_maps()
95 err = bpf_map__set_autocreate(skel->maps.testmod_1, false); in optional_maps()
96 err |= bpf_map__set_autocreate(skel->maps.testmod_2, false); in optional_maps()
97 err |= bpf_map__set_autocreate(skel->maps.optional_map2, true); in optional_maps()
105 check_test_1_link(skel, skel->maps.optional_map2); in optional_maps()
[all …]
A Dringbuf_multi.c56 ASSERT_EQ(bpf_map__max_entries(skel->maps.ringbuf1), page_size, "rb1_size_before"); in test_ringbuf_multi()
57 ASSERT_OK(bpf_map__set_max_entries(skel->maps.ringbuf1, page_size + 1), "rb1_resize"); in test_ringbuf_multi()
58 ASSERT_EQ(bpf_map__max_entries(skel->maps.ringbuf1), 2 * page_size, "rb1_size_after"); in test_ringbuf_multi()
59 ASSERT_OK(bpf_map__set_max_entries(skel->maps.ringbuf1, page_size), "rb1_reset"); in test_ringbuf_multi()
60 ASSERT_EQ(bpf_map__max_entries(skel->maps.ringbuf1), page_size, "rb1_size_final"); in test_ringbuf_multi()
66 err = bpf_map__set_inner_map_fd(skel->maps.ringbuf_hash, proto_fd); in test_ringbuf_multi()
78 …if (!ASSERT_ERR(bpf_map__set_max_entries(skel->maps.ringbuf1, 3 * page_size), "rb1_resize_after_lo… in test_ringbuf_multi()
84 ringbuf = ring_buffer__new(bpf_map__fd(skel->maps.ringbuf1), in test_ringbuf_multi()
97 err = ring_buffer__add(ringbuf, bpf_map__fd(skel->maps.ringbuf2), in test_ringbuf_multi()
A Dbpf_tcp_ca.c105 link = bpf_map__attach_struct_ops(cubic_skel->maps.cubic); in test_cubic()
157 link = bpf_map__attach_struct_ops(dctcp_skel->maps.dctcp); in test_dctcp()
163 cb_opts.map_fd = bpf_map__fd(dctcp_skel->maps.sk_stg_map); in test_dctcp()
200 bpf_map__set_autoattach(dctcp_skel->maps.dctcp, true); in test_dctcp_autoattach_map()
417 err = bpf_link__update_map(link, skel->maps.ca_update_2); in test_update_ca()
455 err = bpf_link__update_map(link, skel->maps.ca_wrong); in test_update_wrong()
493 err = bpf_link__update_map(link, skel->maps.ca_no_link); in test_mixed_links()
549 opts.old_map_fd = bpf_map__fd(skel->maps.ca_update_1); in test_link_replace()
552 bpf_map__fd(skel->maps.ca_update_1), in test_link_replace()
557 opts.old_map_fd = bpf_map__fd(skel->maps.ca_update_2); in test_link_replace()
[all …]
A Dfor_each.c31 max_entries = bpf_map__max_entries(skel->maps.hashmap); in test_hash_map()
35 err = bpf_map__update_elem(skel->maps.hashmap, &key, sizeof(key), in test_hash_map()
50 err = bpf_map__update_elem(skel->maps.percpu_map, &key, sizeof(key), in test_hash_map()
98 max_entries = bpf_map__max_entries(skel->maps.arraymap); in test_array_map()
105 err = bpf_map__update_elem(skel->maps.arraymap, &key, sizeof(key), in test_array_map()
166 max_entries = bpf_map__max_entries(skel->maps.arraymap); in test_multi_maps()
171 err = bpf_map__update_elem(skel->maps.arraymap, &key, sizeof(key), in test_multi_maps()
178 max_entries = bpf_map__max_entries(skel->maps.hashmap); in test_multi_maps()
183 err = bpf_map__update_elem(skel->maps.hashmap, &key, sizeof(key), in test_multi_maps()
223 max_entries = bpf_map__max_entries(skel->maps.hashmap); in test_hash_modify()
[all …]
A Dstacktrace_build_id.c27 control_map_fd = bpf_map__fd(skel->maps.control_map); in test_stacktrace_build_id()
28 stackid_hmap_fd = bpf_map__fd(skel->maps.stackid_hmap); in test_stacktrace_build_id()
29 stackmap_fd = bpf_map__fd(skel->maps.stackmap); in test_stacktrace_build_id()
30 stack_amap_fd = bpf_map__fd(skel->maps.stack_amap); in test_stacktrace_build_id()
61 err = bpf_map__get_next_key(skel->maps.stackmap, NULL, &key, sizeof(key)); in test_stacktrace_build_id()
78 } while (bpf_map__get_next_key(skel->maps.stackmap, &prev_key, &key, sizeof(key)) == 0); in test_stacktrace_build_id()
A Drecursion.c23 bpf_map_delete_elem(bpf_map__fd(skel->maps.hash1), &key); in test_recursion()
25 bpf_map_delete_elem(bpf_map__fd(skel->maps.hash1), &key); in test_recursion()
29 bpf_map_delete_elem(bpf_map__fd(skel->maps.hash2), &key); in test_recursion()
31 bpf_map_delete_elem(bpf_map__fd(skel->maps.hash2), &key); in test_recursion()
A Dcg_storage_multi.c119 if (assert_storage(obj->maps.cgroup_storage, in test_egress_only()
142 if (assert_storage(obj->maps.cgroup_storage, in test_egress_only()
147 if (assert_storage(obj->maps.cgroup_storage, in test_egress_only()
198 if (assert_storage(obj->maps.cgroup_storage, in test_isolated()
203 if (assert_storage(obj->maps.cgroup_storage, in test_isolated()
240 if (assert_storage(obj->maps.cgroup_storage, in test_isolated()
245 if (assert_storage(obj->maps.cgroup_storage, in test_isolated()
251 if (assert_storage(obj->maps.cgroup_storage, in test_isolated()
256 if (assert_storage(obj->maps.cgroup_storage, in test_isolated()
313 if (assert_storage(obj->maps.cgroup_storage, in test_shared()
[all …]
/tools/perf/arch/x86/util/
A Dmachine.c20 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/x86/
A Dtest_mremap_vdso.c64 bool vdso_sealed(FILE *maps) in vdso_sealed() argument
69 while (fgets(line, sizeof(line), maps)) { in vdso_sealed()
87 FILE *maps; in main() local
92 maps = fopen("/proc/self/smaps", "r"); in main()
93 if (!maps) { in main()
101 if (vdso_sealed(maps)) { in main()
106 fclose(maps); in main()
/tools/testing/selftests/exec/
A Dload_address.c56 FILE *maps; in main() local
63 maps = fopen("/proc/self/maps", "r"); in main()
64 if (!maps) in main()
66 while (fgets(buf, sizeof(buf), maps)) { in main()
69 fclose(maps); in main()

Completed in 36 milliseconds

123456789