Home
last modified time | relevance | path

Searched refs:btf2 (Results 1 – 4 of 4) sorted by relevance

/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/
Dbtf_dedup_split.c9 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, "f2", 5, 32, 0); /* int f2; */ in test_split_simple()
[all …]
Dbtf_split.c19 struct btf *btf1, *btf2; in test_btf_split() local
35 btf2 = btf__new_empty_split(btf1); in test_btf_split()
36 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_btf_split()
40 ASSERT_EQ(btf__pointer_size(btf2), 8, "inherit_ptr_sz"); in test_btf_split()
42 str_off = btf__find_str(btf2, "int"); in test_btf_split()
45 t = btf__type_by_id(btf2, 1); in test_btf_split()
49 ASSERT_STREQ(btf__str_by_offset(btf2, t->name_off), "int", "int_name"); in test_btf_split()
51 btf__add_struct(btf2, "s2", 16); /* [4] struct s2 { */ in test_btf_split()
52 btf__add_field(btf2, "f1", 3, 0, 0); /* struct s1 f1; */ in test_btf_split()
53 btf__add_field(btf2, "f2", 1, 32, 0); /* int f2; */ in test_btf_split()
[all …]
/Linux-v5.15/tools/lib/bpf/
Dlinker.c1293 const struct btf *btf2, __u32 id2) in glob_sym_btf_matches() argument
1303 t2 = skip_mods_and_typedefs(btf2, id2, &id2); in glob_sym_btf_matches()
1308 n2 = btf__str_by_offset(btf2, t2->name_off); in glob_sym_btf_matches()
1347 n2 = btf__str_by_offset(btf2, t2->name_off); in glob_sym_btf_matches()
1428 n2 = btf__str_by_offset(btf2, m2->name_off); in glob_sym_btf_matches()
1439 if (!glob_sym_btf_matches(sym_name, exact, btf1, m1->type, btf2, m2->type)) in glob_sym_btf_matches()
1459 if (!glob_sym_btf_matches(sym_name, exact, btf1, m1->type, btf2, m2->type)) in glob_sym_btf_matches()
/Linux-v5.15/kernel/bpf/
Dbtf.c5159 const struct btf *btf2, u32 id2) in btf_types_are_same() argument
5163 if (btf1 == btf2) in btf_types_are_same()
5165 return btf_type_by_id(btf1, id1) == btf_type_by_id(btf2, id2); in btf_types_are_same()
5298 struct btf *btf2, const struct btf_type *t2) in btf_check_func_type_match() argument
5305 fn2 = btf_name_by_offset(btf2, t2->name_off); in btf_check_func_type_match()
5319 t2 = btf_type_by_id(btf2, t2->type); in btf_check_func_type_match()
5335 t2 = btf_type_skip_modifiers(btf2, t2->type, NULL); in btf_check_func_type_match()
5346 t2 = btf_type_skip_modifiers(btf2, args2[i].type, NULL); in btf_check_func_type_match()
5375 t2 = btf_type_skip_modifiers(btf2, t2->type, NULL); in btf_check_func_type_match()
5395 s2 = btf_name_by_offset(btf2, t2->name_off); in btf_check_func_type_match()
[all …]