| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | btf_dedup_split.c | 9 struct btf *btf1, *btf2; in test_split_simple() local 36 btf2 = btf__new_empty_split(btf1); in test_split_simple() 37 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_split_simple() 41 ASSERT_EQ(btf__pointer_size(btf2), 8, "inherit_ptr_sz"); in test_split_simple() 43 str_off = btf__find_str(btf2, "int"); in test_split_simple() 46 t = btf__type_by_id(btf2, 1); in test_split_simple() 50 ASSERT_STREQ(btf__str_by_offset(btf2, t->name_off), "int", "int_name"); in test_split_simple() 52 btf__add_struct(btf2, "s2", 16); /* [4] struct s2 { */ in test_split_simple() 53 btf__add_field(btf2, "f1", 6, 0, 0); /* struct s1 f1; */ in test_split_simple() 54 btf__add_field(btf2, "f in test_split_simple() 127 struct btf *btf1, *btf2; test_split_fwd_resolve() local 225 struct btf *btf1, *btf2; test_split_struct_duped() local 358 struct btf *btf1, *btf2 = NULL; test_split_dup_struct_in_cu() local [all...] |
| H A D | btf_distill.c | 16 struct btf *btf1 = NULL, *btf2 = NULL, *btf3 = NULL, *btf4 = NULL; in test_distilled_base() local 103 btf2 = btf__new_empty_split(btf1); in test_distilled_base() 104 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_distilled_base() 107 btf__add_ptr(btf2, 3); /* [18] ptr to struct s1 */ in test_distilled_base() 109 btf__add_ptr(btf2, 4); /* [19] ptr to struct (anon) */ in test_distilled_base() 110 btf__add_const(btf2, 6); /* [20] const union u1 */ in test_distilled_base() 111 btf__add_restrict(btf2, 7); /* [21] restrict union (anon) */ in test_distilled_base() 112 btf__add_volatile(btf2, 8); /* [22] volatile enum e1 */ in test_distilled_base() 113 btf__add_typedef(btf2, "et", 9); /* [23] typedef enum (anon) */ in test_distilled_base() 114 btf__add_const(btf2, 10); /* [24] const enum64 e641 */ in test_distilled_base() [all …]
|
| H A D | btf_split.c | 52 struct btf *btf1 = NULL, *btf2 = NULL, *btf3 = NULL; in test_btf_split() 69 btf2 = btf__new_empty_split(btf1); in test_btf_split() 70 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_btf_split() 74 ASSERT_EQ(btf__pointer_size(btf2), 8, "inherit_ptr_sz"); in test_btf_split() 76 str_off = btf__find_str(btf2, "int"); in test_btf_split() 79 t = btf__type_by_id(btf2, 1); in test_btf_split() 83 ASSERT_STREQ(btf__str_by_offset(btf2, t->name_off), "int", "int_name"); in test_btf_split() 85 btf__add_struct(btf2, "s2", 16); /* [4] struct s2 { */ in test_btf_split() 86 btf__add_field(btf2, "f1", 3, 0, 0); /* struct s1 f1; */ in test_btf_split() 87 btf__add_field(btf2, "f in test_btf_split() 18 struct btf *btf1, *btf2; test_btf_split() local [all...] |
| H A D | btf_write.c | 406 struct btf *btf1 = NULL, *btf2 = NULL; in test_btf_add_btf() local 413 btf2 = btf__new_empty(); in test_btf_add_btf() 414 if (!ASSERT_OK_PTR(btf2, "btf2")) in test_btf_add_btf() 418 gen_btf(btf2); in test_btf_add_btf() 420 id = btf__add_btf(btf1, btf2); in test_btf_add_btf() 497 btf__free(btf2); in test_btf_add_btf()
|
| /linux/tools/lib/bpf/ |
| H A D | linker.c | 1484 const struct btf *btf2, __u32 id2) in glob_sym_btf_matches() argument 1494 t2 = skip_mods_and_typedefs(btf2, id2, &id2); in glob_sym_btf_matches() 1499 n2 = btf__str_by_offset(btf2, t2->name_off); in glob_sym_btf_matches() 1539 n2 = btf__str_by_offset(btf2, t2->name_off); in glob_sym_btf_matches() 1621 n2 = btf__str_by_offset(btf2, m2->name_off); in glob_sym_btf_matches() 1632 if (!glob_sym_btf_matches(sym_name, exact, btf1, m1->type, btf2, m2->type)) in glob_sym_btf_matches() 1652 if (!glob_sym_btf_matches(sym_name, exact, btf1, m1->type, btf2, m2->type)) in glob_sym_btf_matches()
|
| /linux/kernel/bpf/ |
| H A D | btf.c | 7379 const struct btf *btf2, u32 id2) in btf_types_are_same() argument 7383 if (btf1 == btf2) in btf_types_are_same() 7385 return btf_type_by_id(btf1, id1) == btf_type_by_id(btf2, id2); in btf_types_are_same() 7543 struct btf *btf2, const struct btf_type *t2) in btf_check_func_type_match() argument 7550 fn2 = btf_name_by_offset(btf2, t2->name_off); in btf_check_func_type_match() 7564 t2 = btf_type_by_id(btf2, t2->type); in btf_check_func_type_match() 7580 t2 = btf_type_skip_modifiers(btf2, t2->type, NULL); in btf_check_func_type_match() 7591 t2 = btf_type_skip_modifiers(btf2, args2[i].type, NULL); in btf_check_func_type_match() 7620 t2 = btf_type_skip_modifiers(btf2, t2->type, NULL); in btf_check_func_type_match() 7640 s2 = btf_name_by_offset(btf2, t2->name_off); in btf_check_func_type_match() [all …]
|