Searched refs:ids1 (Results 1 – 4 of 4) sorted by relevance
/Linux-v6.1/tools/perf/tests/ |
D | expr.c | 15 struct hashmap *ids1, *ids2; in test_ids_union() local 18 ids1 = ids__new(); in test_ids_union() 19 TEST_ASSERT_VAL("ids__new", ids1); in test_ids_union() 23 ids1 = ids__union(ids1, ids2); in test_ids_union() 24 TEST_ASSERT_EQUAL("union", (int)hashmap__size(ids1), 0); in test_ids_union() 30 TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids1, strdup("foo")), 0); in test_ids_union() 31 TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids1, strdup("bar")), 0); in test_ids_union() 33 ids1 = ids__union(ids1, ids2); in test_ids_union() 34 TEST_ASSERT_EQUAL("union", (int)hashmap__size(ids1), 2); in test_ids_union() 41 ids1 = ids__union(ids1, ids2); in test_ids_union() [all …]
|
/Linux-v6.1/tools/perf/util/ |
D | expr.c | 109 struct hashmap *ids__union(struct hashmap *ids1, struct hashmap *ids2) in ids__union() argument 117 if (!ids1) in ids__union() 121 return ids1; in ids__union() 123 if (hashmap__size(ids1) < hashmap__size(ids2)) { in ids__union() 124 struct hashmap *tmp = ids1; in ids__union() 126 ids1 = ids2; in ids__union() 130 ret = hashmap__set(ids1, cur->key, cur->value, in ids__union() 136 hashmap__free(ids1); in ids__union() 142 return ids1; in ids__union()
|
D | expr.y | 77 static struct ids union_expr(struct ids ids1, struct ids ids2) 81 .ids = ids__union(ids1.ids, ids2.ids),
|
D | expr.h | 33 struct hashmap *ids__union(struct hashmap *ids1, struct hashmap *ids2);
|