| /tools/perf/util/ |
| A D | hashmap.h | 131 long *old_key, long *old_value); 133 #define hashmap__insert(map, key, value, strategy, old_key, old_value) \ argument 135 hashmap_cast_ptr(old_key), \ 141 #define hashmap__set(map, key, value, old_key, old_value) \ argument 142 hashmap__insert((map), (key), (value), HASHMAP_SET, (old_key), (old_value)) 144 #define hashmap__update(map, key, value, old_key, old_value) \ argument 145 hashmap__insert((map), (key), (value), HASHMAP_UPDATE, (old_key), (old_value)) 150 bool hashmap_delete(struct hashmap *map, long key, long *old_key, long *old_value); 152 #define hashmap__delete(map, key, old_key, old_value) \ argument 154 hashmap_cast_ptr(old_key), \
|
| A D | expr.c | 95 char *old_key = NULL; in ids__insert() local 101 free(old_key); in ids__insert() 112 char *old_key = NULL; in ids__union() local 128 free(old_key); in ids__union() 158 char *old_key = NULL; in expr__add_id_val_source_count() local 175 free(old_key); in expr__add_id_val_source_count() 183 char *old_key = NULL; in expr__add_ref() local 214 free(old_key); in expr__add_ref() 283 char *old_key = NULL; in expr__del_id() local 285 hashmap__delete(ctx->ids, id, &old_key, &old_val); in expr__del_id() [all …]
|
| A D | fncache.c | 50 char *old_key = NULL, *key = strdup(name); in update_fncache() local 53 hashmap__set(fncache__get(), key, res, &old_key, /*old_value*/NULL); in update_fncache() 54 free(old_key); in update_fncache()
|
| A D | hashmap.c | 156 long *old_key, long *old_value) in hashmap_insert() argument 162 if (old_key) in hashmap_insert() 163 *old_key = 0; in hashmap_insert() 170 if (old_key) in hashmap_insert() 171 *old_key = entry->key; in hashmap_insert() 221 long *old_key, long *old_value) in hashmap_delete() argument 230 if (old_key) in hashmap_delete() 231 *old_key = entry->key; in hashmap_delete()
|
| /tools/lib/bpf/ |
| A D | hashmap.h | 131 long *old_key, long *old_value); 133 #define hashmap__insert(map, key, value, strategy, old_key, old_value) \ argument 135 hashmap_cast_ptr(old_key), \ 141 #define hashmap__set(map, key, value, old_key, old_value) \ argument 142 hashmap__insert((map), (key), (value), HASHMAP_SET, (old_key), (old_value)) 144 #define hashmap__update(map, key, value, old_key, old_value) \ argument 145 hashmap__insert((map), (key), (value), HASHMAP_UPDATE, (old_key), (old_value)) 150 bool hashmap_delete(struct hashmap *map, long key, long *old_key, long *old_value); 152 #define hashmap__delete(map, key, old_key, old_value) \ argument 154 hashmap_cast_ptr(old_key), \
|
| A D | hashmap.c | 156 long *old_key, long *old_value) in hashmap_insert() argument 162 if (old_key) in hashmap_insert() 163 *old_key = 0; in hashmap_insert() 170 if (old_key) in hashmap_insert() 171 *old_key = entry->key; in hashmap_insert() 221 long *old_key, long *old_value) in hashmap_delete() argument 230 if (old_key) in hashmap_delete() 231 *old_key = entry->key; in hashmap_delete()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | hashmap.c | 262 const char *key, *value, *old_key, *old_value; in test_hashmap_ptr_iface() local 279 err = hashmap__insert(map, "a", "apple", HASHMAP_SET, &old_key, &old_value); in test_hashmap_ptr_iface() 282 CHECK_STR("hashmap__update", old_key, "a"); in test_hashmap_ptr_iface() 289 err = hashmap__set(map, "b", "breadfruit", &old_key, &old_value); in test_hashmap_ptr_iface() 292 CHECK_STR("hashmap__set", old_key, "b"); in test_hashmap_ptr_iface() 295 err = hashmap__update(map, "b", "blueberry", &old_key, &old_value); in test_hashmap_ptr_iface() 298 CHECK_STR("hashmap__update", old_key, "b"); in test_hashmap_ptr_iface() 305 if (CHECK(!hashmap__delete(map, "c", &old_key, &old_value), in test_hashmap_ptr_iface() 308 CHECK_STR("hashmap__delete", old_key, "c"); in test_hashmap_ptr_iface()
|