Home
last modified time | relevance | path

Searched refs:hash_fn (Results 1 – 6 of 6) sorted by relevance

/tools/perf/util/
A Dhashmap.c38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, in hashmap__init() argument
41 map->hash_fn = hash_fn; in hashmap__init()
51 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, in hashmap__new() argument
59 hashmap__init(map, hash_fn, equal_fn, ctx); in hashmap__new()
118 h = hash_bits(map->hash_fn(cur->key, map->ctx), new_cap_bits); in hashmap_grow()
167 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_insert()
191 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_insert()
211 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_find()
226 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_delete()
A Dhashmap.h73 hashmap_hash_fn hash_fn; member
83 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn,
85 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn,
194 ? (map)->buckets[hash_bits((map)->hash_fn((_key), (map)->ctx), (map)->cap_bits)] \
202 ? (map)->buckets[hash_bits((map)->hash_fn((_key), (map)->ctx), (map)->cap_bits)] \
/tools/lib/bpf/
A Dhashmap.c38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, in hashmap__init() argument
41 map->hash_fn = hash_fn; in hashmap__init()
51 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, in hashmap__new() argument
59 hashmap__init(map, hash_fn, equal_fn, ctx); in hashmap__new()
118 h = hash_bits(map->hash_fn(cur->key, map->ctx), new_cap_bits); in hashmap_grow()
167 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_insert()
191 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_insert()
211 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_find()
226 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap_delete()
A Dhashmap.h73 hashmap_hash_fn hash_fn; member
83 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn,
85 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn,
194 ? (map)->buckets[hash_bits((map)->hash_fn((_key), (map)->ctx), (map)->cap_bits)] \
202 ? (map)->buckets[hash_bits((map)->hash_fn((_key), (map)->ctx), (map)->cap_bits)] \
A Dbtf.c3734 hashmap_hash_fn hash_fn = btf_dedup_identity_hash_fn; in btf_dedup_new() local
3741 hash_fn = btf_dedup_collision_hash_fn; in btf_dedup_new()
3746 d->dedup_table = hashmap__new(hash_fn, btf_dedup_equal_fn, NULL); in btf_dedup_new()
/tools/testing/selftests/bpf/prog_tests/
A Dhashmap.c14 static size_t hash_fn(long k, void *ctx) in hash_fn() function
51 map = hashmap__new(hash_fn, equal_fn, NULL); in test_hashmap_generic()
419 map = hashmap__new(hash_fn, equal_fn, NULL); in test_hashmap_empty()

Completed in 24 milliseconds