/linux-master/tools/perf/util/ |
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 | hashmap.h | 72 struct hashmap { struct 83 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, 85 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, 88 void hashmap__clear(struct hashmap *map); 89 void hashmap__free(struct hashmap *map); 91 size_t hashmap__size(const struct hashmap *map); 92 size_t hashmap__capacity(const struct hashmap *map); 102 * This turns hashmap into a multimap by allowing multiple values to be 103 * associated with the same key. Most useful read API for such hashmap is 129 int hashmap_insert(struct hashmap *ma [all...] |
H A D | hashmap.c | 13 #include "hashmap.h" 38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, 51 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, 55 struct hashmap *map = malloc(sizeof(struct hashmap)); 63 void hashmap__clear(struct hashmap *map) 76 void hashmap__free(struct hashmap *map) 85 size_t hashmap__size(const struct hashmap *map) 90 size_t hashmap__capacity(const struct hashmap *map) 95 static bool hashmap_needs_to_grow(struct hashmap *ma [all...] |
H A D | threads.h | 5 #include "hashmap.h" 15 struct hashmap shard;
|
H A D | expr.c | 15 #include "util/hashmap.h" 73 struct hashmap *ids__new(void) 75 struct hashmap *hash; 83 void ids__free(struct hashmap *ids) 99 int ids__insert(struct hashmap *ids, const char *id) 113 struct hashmap *ids__union(struct hashmap *ids1, struct hashmap *ids2) 128 struct hashmap *tmp = ids1;
|
H A D | evsel.h | 22 struct hashmap; 135 struct hashmap *per_pkg_mask;
|
/linux-master/tools/testing/selftests/bpf/benchs/ |
H A D | run_bench_bpf_hashmap_full_update.sh | 9 summary=$($RUN_BENCH -p $nr_threads bpf-hashmap-full-update)
|
H A D | bench_local_storage.c | 29 0, "When doing hashmap test, set number of hashmap keys test uses"}, 104 * populate the hashmap for a similar comparison 109 fprintf(stderr, "Error prepopulating hashmap (key %d)\n", key); 115 static void __setup(struct bpf_program *prog, bool hashmap) argument 122 if (!hashmap) 146 if (hashmap) 157 if (hashmap) 274 .name = "local-storage-cache-hashmap-control",
|
H A D | bench_bloom_filter_map.c | 149 /* Populate hashmap, bloom filter map, and array map with the same 164 fprintf(stderr, "failed to add elem to hashmap: %d\n", 213 ctx.hashmap_fd = bpf_map__fd(ctx.skel->maps.hashmap); 272 bpf_map__set_max_entries(skel->maps.hashmap, args.nr_entries); 283 bpf_map__set_value_size(skel->maps.hashmap, args.value_size); 285 /* For the hashmap, we use the value as the key as well */ 286 bpf_map__set_key_size(skel->maps.hashmap, args.value_size); 458 .name = "hashmap-without-bloom", 469 .name = "hashmap-with-bloom",
|
/linux-master/tools/lib/bpf/ |
H A D | hashmap.h | 72 struct hashmap { struct 83 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, 85 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, 88 void hashmap__clear(struct hashmap *map); 89 void hashmap__free(struct hashmap *map); 91 size_t hashmap__size(const struct hashmap *map); 92 size_t hashmap__capacity(const struct hashmap *map); 102 * This turns hashmap into a multimap by allowing multiple values to be 103 * associated with the same key. Most useful read API for such hashmap is 129 int hashmap_insert(struct hashmap *ma [all...] |
H A D | hashmap.c | 13 #include "hashmap.h" 38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, 51 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, 55 struct hashmap *map = malloc(sizeof(struct hashmap)); 63 void hashmap__clear(struct hashmap *map) 76 void hashmap__free(struct hashmap *map) 85 size_t hashmap__size(const struct hashmap *map) 90 size_t hashmap__capacity(const struct hashmap *map) 95 static bool hashmap_needs_to_grow(struct hashmap *ma [all...] |
H A D | strset.c | 8 #include "hashmap.h" 19 struct hashmap *strs_hash; 42 struct hashmap *hash;
|
H A D | btf_dump.c | 21 #include "hashmap.h" 109 struct hashmap *type_names; 114 struct hashmap *ident_names; 223 static void btf_dump_free_names(struct hashmap *map) 649 static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, 1632 static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, 1656 struct hashmap *name_map)
|
/linux-master/tools/bpf/bpftool/ |
H A D | pids.c | 12 #include <bpf/hashmap.h> 19 int build_obj_refs_table(struct hashmap **map, enum bpf_obj_type type) 23 void delete_obj_refs_table(struct hashmap *map) {} 24 void emit_obj_refs_plain(struct hashmap *map, __u32 id, const char *prefix) {} 25 void emit_obj_refs_json(struct hashmap *map, __u32 id, json_writer_t *json_writer) {} 31 static void add_ref(struct hashmap *map, struct pid_iter_entry *e) 86 p_err("failed to append entry to hashmap for ID %u: %s", 98 int build_obj_refs_table(struct hashmap **map, enum bpf_obj_type type) 108 p_err("failed to create hashmap for PID references"); 177 void delete_obj_refs_table(struct hashmap *ma [all...] |
H A D | main.h | 16 #include <bpf/hashmap.h> 86 extern struct hashmap *refs_table; 115 int build_pinned_obj_table(struct hashmap *table, 117 void delete_pinned_obj_table(struct hashmap *table); 118 __weak int build_obj_refs_table(struct hashmap **table, 120 __weak void delete_obj_refs_table(struct hashmap *table); 121 __weak void emit_obj_refs_json(struct hashmap *table, __u32 id, 123 __weak void emit_obj_refs_plain(struct hashmap *table, __u32 id, 262 static inline bool hashmap__empty(struct hashmap *map)
|
H A D | btf.c | 17 #include <bpf/hashmap.h> 734 build_btf_type_table(struct hashmap *tab, enum bpf_obj_type type, 820 p_err("failed to append entry to hashmap for BTF ID %u, object ID %u: %s", 834 build_btf_tables(struct hashmap *btf_prog_table, 835 struct hashmap *btf_map_table) 860 struct hashmap *btf_prog_table, 861 struct hashmap *btf_map_table) 893 struct hashmap *btf_prog_table, 894 struct hashmap *btf_map_table) 928 show_btf(int fd, struct hashmap *btf_prog_tabl [all...] |
H A D | main.c | 14 #include <bpf/hashmap.h> 35 struct hashmap *refs_table;
|
H A D | Makefile | 37 # We need to copy hashmap.h, nlattr.h, relo_core.h and libbpf_internal.h 39 LIBBPF_INTERNAL_HDRS := $(addprefix $(LIBBPF_HDRS_DIR)/,hashmap.h nlattr.h relo_core.h libbpf_internal.h) 40 LIBBPF_BOOTSTRAP_INTERNAL_HDRS := $(addprefix $(LIBBPF_BOOTSTRAP_HDRS_DIR)/,hashmap.h relo_core.h libbpf_internal.h)
|
H A D | common.c | 30 #include <bpf/hashmap.h> 470 static struct hashmap *build_fn_table; 505 p_err("failed to append entry to hashmap for ID %u, path '%s': %s", 517 int build_pinned_obj_table(struct hashmap *tab, 546 void delete_pinned_obj_table(struct hashmap *map)
|
/linux-master/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); 89 hashmap_elems = bpf_for_each_map_elem(&hashmap, check_hash_elem, &data, 0);
|
H A D | bloom_filter_bench.c | 40 } hashmap SEC(".maps"); 142 result = bpf_map_lookup_elem(&hashmap,
|
/linux-master/tools/perf/ |
H A D | check-headers.sh | 185 check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h 186 check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | for_each.c | 29 max_entries = bpf_map__max_entries(skel->maps.hashmap); 33 err = bpf_map__update_elem(skel->maps.hashmap, &key, sizeof(key), 63 err = bpf_map__lookup_elem(skel->maps.hashmap, &key, sizeof(key), &val, sizeof(val), 0);
|
H A D | hashmap.c | 4 * Tests for libbpf's hashmap. 9 #include "bpf/hashmap.h" 49 struct hashmap *map; 259 /* Verify that hashmap interface works with pointer keys and values */ 264 struct hashmap *map; 268 if (CHECK(!map, "hashmap__new", "can't allocate hashmap\n")) 343 struct hashmap *map; 415 struct hashmap *map;
|
/linux-master/tools/perf/tests/ |
H A D | expr.c | 5 #include "util/hashmap.h" 17 struct hashmap *ids1, *ids2;
|