/linux/tools/lib/bpf/ |
H A D | hashmap.c | 38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, in hashmap__init() 51 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, in hashmap__new() 55 struct hashmap *map = malloc(sizeof(struct hashmap)); in hashmap__new() 63 void hashmap__clear(struct hashmap *map) in hashmap__clear() 76 void hashmap__free(struct hashmap *map) in hashmap__free() 85 size_t hashmap__size(const struct hashmap *map) in hashmap__size() 90 size_t hashmap__capacity(const struct hashmap *map) in hashmap__capacity() 95 static bool hashmap_needs_to_grow(struct hashmap *map) in hashmap_needs_to_grow() 101 static int hashmap_grow(struct hashmap *map) in hashmap_grow() 130 static bool hashmap_find_entry(const struct hashmap *map, in hashmap_find_entry() [all …]
|
H A D | strset.c | 19 struct hashmap *strs_hash; 42 struct hashmap *hash; in strset__new()
|
H A D | Build | 2 netlink.o bpf_prog_linfo.o libbpf_probes.o hashmap.o \
|
/linux/tools/perf/util/ |
H A D | hashmap.c | 38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, in hashmap__init() 51 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, in hashmap__new() 55 struct hashmap *map = malloc(sizeof(struct hashmap)); in hashmap__new() 63 void hashmap__clear(struct hashmap *map) in hashmap__clear() 76 void hashmap__free(struct hashmap *map) in hashmap__free() 85 size_t hashmap__size(const struct hashmap *map) in hashmap__size() 90 size_t hashmap__capacity(const struct hashmap *map) in hashmap__capacity() 95 static bool hashmap_needs_to_grow(struct hashmap *map) in hashmap_needs_to_grow() 101 static int hashmap_grow(struct hashmap *map) in hashmap_grow() 130 static bool hashmap_find_entry(const struct hashmap *map, in hashmap_find_entry() [all …]
|
H A D | expr.h | 5 struct hashmap; 16 struct hashmap *ids; 22 struct hashmap *ids__new(void); 23 void ids__free(struct hashmap *ids); 24 int ids__insert(struct hashmap *ids, const char *id); 29 struct hashmap *ids__union(struct hashmap *ids1, struct hashmap *ids2);
|
H A D | expr.c | 66 struct hashmap *ids__new(void) in ids__new() 68 struct hashmap *hash; in ids__new() 76 void ids__free(struct hashmap *ids) in ids__free() 92 int ids__insert(struct hashmap *ids, const char *id) in ids__insert() 106 struct hashmap *ids__union(struct hashmap *ids1, struct hashmap *ids2) in ids__union() 121 struct hashmap *tmp = ids1; in ids__union()
|
H A D | fncache.c | 11 static struct hashmap *fncache; 28 static struct hashmap *fncache__get(void) in fncache__get()
|
H A D | bpf-trace-summary.c | 168 static int update_thread_stats(struct hashmap *hash, struct syscall_key *map_key, in update_thread_stats() 232 static int update_total_stats(struct hashmap *hash, struct syscall_key *map_key, in update_total_stats() 301 static int update_cgroup_stats(struct hashmap *hash, struct syscall_key *map_key, in update_cgroup_stats() 375 struct hashmap schash; in trace_print_bpf_summary()
|
H A D | pmu.h | 17 struct hashmap; 131 struct hashmap *aliases;
|
H A D | threads.h | 15 struct hashmap shard;
|
H A D | ftrace.h | 21 struct hashmap *profile_hash;
|
/linux/tools/bpf/bpftool/ |
H A D | pids.c | 19 int build_obj_refs_table(struct hashmap **map, enum bpf_obj_type type) in build_obj_refs_table() 23 void delete_obj_refs_table(struct hashmap *map) {} in delete_obj_refs_table() 24 void emit_obj_refs_plain(struct hashmap *map, __u32 id, const char *prefix) {} in emit_obj_refs_plain() 25 void emit_obj_refs_json(struct hashmap *map, __u32 id, json_writer_t *json_writer) {} in emit_obj_refs_json() 31 static void add_ref(struct hashmap *map, struct pid_iter_entry *e) in add_ref() 100 int build_obj_refs_table(struct hashmap **map, enum bpf_obj_type type) in build_obj_refs_table() 184 void delete_obj_refs_table(struct hashmap *map) in delete_obj_refs_table() 202 void emit_obj_refs_json(struct hashmap *map, __u32 id, in emit_obj_refs_json() 235 void emit_obj_refs_plain(struct hashmap *map, __u32 id, const char *prefix) in emit_obj_refs_plain()
|
H A D | main.h | 87 extern struct hashmap *refs_table; 116 int build_pinned_obj_table(struct hashmap *table, 118 void delete_pinned_obj_table(struct hashmap *table); 119 __weak int build_obj_refs_table(struct hashmap **table, 121 __weak void delete_obj_refs_table(struct hashmap *table); 122 __weak void emit_obj_refs_json(struct hashmap *table, __u32 id, 124 __weak void emit_obj_refs_plain(struct hashmap *table, __u32 id, 266 static inline bool hashmap__empty(struct hashmap *map) in hashmap__empty()
|
H A D | btf.c | 1114 build_btf_type_table(struct hashmap *tab, enum bpf_obj_type type, in build_btf_type_table() 1217 build_btf_tables(struct hashmap *btf_prog_table, in build_btf_tables() 1218 struct hashmap *btf_map_table) in build_btf_tables() 1243 struct hashmap *btf_prog_table, in show_btf_plain() 1244 struct hashmap *btf_map_table) in show_btf_plain() 1276 struct hashmap *btf_prog_table, in show_btf_json() 1277 struct hashmap *btf_map_table) in show_btf_json() 1311 show_btf(int fd, struct hashmap *btf_prog_table, in show_btf() 1312 struct hashmap *btf_map_table) in show_btf() 1349 struct hashmap *btf_prog_table; in do_show() [all …]
|
H A D | Makefile | 33 LIBBPF_INTERNAL_HDRS := $(addprefix $(LIBBPF_HDRS_DIR)/,hashmap.h nlattr.h relo_core.h libbpf_inter… 34 LIBBPF_BOOTSTRAP_INTERNAL_HDRS := $(addprefix $(LIBBPF_BOOTSTRAP_HDRS_DIR)/,hashmap.h relo_core.h l…
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | for_each.c | 31 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() 65 err = bpf_map__lookup_elem(skel->maps.hashmap, &key, sizeof(key), &val, sizeof(val), 0); in test_hash_map() 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() 227 err = bpf_map__update_elem(skel->maps.hashmap, &key, sizeof(key), in test_hash_modify()
|
H A D | hashmap.c | 49 struct hashmap *map; in test_hashmap_generic() 264 struct hashmap *map; in test_hashmap_ptr_iface() 343 struct hashmap *map; in test_hashmap_multimap() 415 struct hashmap *map; in test_hashmap_empty()
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | for_each_hash_map_elem.c | 13 } hashmap SEC(".maps"); 71 bpf_for_each_map_elem(&hashmap, check_hash_elem, &data, 0); in check_percpu_elem() 89 hashmap_elems = bpf_for_each_map_elem(&hashmap, check_hash_elem, &data, 0); in test_pkt_access()
|
H A D | for_each_hash_modify.c | 13 } hashmap SEC(".maps"); 27 bpf_for_each_map_elem(&hashmap, cb, NULL, 0); in test_pkt_access()
|
H A D | for_each_multi_maps.c | 19 } hashmap SEC(".maps"); 45 bpf_for_each_map_elem(&hashmap, check_map_elem, &data, 0); in test_pkt_access()
|
H A D | bloom_filter_bench.c | 40 } hashmap SEC(".maps"); 142 result = bpf_map_lookup_elem(&hashmap, in bloom_hashmap_lookup()
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | bench_local_storage.c | 115 static void __setup(struct bpf_program *prog, bool hashmap) in __setup() argument 122 if (!hashmap) in __setup() 146 if (hashmap) in __setup() 157 if (hashmap) in __setup()
|
H A D | bench_bloom_filter_map.c | 213 ctx.hashmap_fd = bpf_map__fd(ctx.skel->maps.hashmap); in populate_maps() 272 bpf_map__set_max_entries(skel->maps.hashmap, args.nr_entries); in setup_skeleton() 283 bpf_map__set_value_size(skel->maps.hashmap, args.value_size); in setup_skeleton() 286 bpf_map__set_key_size(skel->maps.hashmap, args.value_size); in setup_skeleton()
|
H A D | run_bench_bpf_hashmap_full_update.sh | 9 summary=$($RUN_BENCH -p $nr_threads bpf-hashmap-full-update)
|
/linux/tools/perf/ |
H A D | check-headers.sh | 216 check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h 217 check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
|