Lines Matching refs:btf1

9 	struct btf *btf1, *btf2;  in test_split_simple()  local
12 btf1 = btf__new_empty(); in test_split_simple()
13 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_simple()
16 btf__set_pointer_size(btf1, 8); /* enforce 64-bit arch */ in test_split_simple()
18 btf__add_int(btf1, "int", 4, BTF_INT_SIGNED); /* [1] int */ in test_split_simple()
19 btf__add_ptr(btf1, 1); /* [2] ptr to int */ in test_split_simple()
20 btf__add_struct(btf1, "s1", 4); /* [3] struct s1 { */ in test_split_simple()
21 btf__add_field(btf1, "f1", 1, 0, 0); /* int f1; */ in test_split_simple()
25 btf1, in test_split_simple()
31 ASSERT_STREQ(btf_type_c_dump(btf1), "\ in test_split_simple()
36 btf2 = btf__new_empty_split(btf1); in test_split_simple()
123 btf__free(btf1); in test_split_simple()
127 struct btf *btf1, *btf2; in test_split_fwd_resolve() local
130 btf1 = btf__new_empty(); in test_split_fwd_resolve()
131 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_fwd_resolve()
134 btf__set_pointer_size(btf1, 8); /* enforce 64-bit arch */ in test_split_fwd_resolve()
136 btf__add_int(btf1, "int", 4, BTF_INT_SIGNED); /* [1] int */ in test_split_fwd_resolve()
137 btf__add_ptr(btf1, 4); /* [2] ptr to struct s1 */ in test_split_fwd_resolve()
138 btf__add_ptr(btf1, 5); /* [3] ptr to struct s2 */ in test_split_fwd_resolve()
139 btf__add_struct(btf1, "s1", 16); /* [4] struct s1 { */ in test_split_fwd_resolve()
140 btf__add_field(btf1, "f1", 2, 0, 0); /* struct s1 *f1; */ in test_split_fwd_resolve()
141 btf__add_field(btf1, "f2", 3, 64, 0); /* struct s2 *f2; */ in test_split_fwd_resolve()
143 btf__add_struct(btf1, "s2", 4); /* [5] struct s2 { */ in test_split_fwd_resolve()
144 btf__add_field(btf1, "f1", 1, 0, 0); /* int f1; */ in test_split_fwd_resolve()
147 btf__add_struct(btf1, "s3", 4); /* [6] struct s3 { */ in test_split_fwd_resolve()
148 btf__add_field(btf1, "f1", 1, 0, 0); /* int f1; */ in test_split_fwd_resolve()
152 btf1, in test_split_fwd_resolve()
164 btf2 = btf__new_empty_split(btf1); in test_split_fwd_resolve()
221 btf__free(btf1); in test_split_fwd_resolve()
225 struct btf *btf1, *btf2; in test_split_struct_duped() local
228 btf1 = btf__new_empty(); in test_split_struct_duped()
229 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_struct_duped()
232 btf__set_pointer_size(btf1, 8); /* enforce 64-bit arch */ in test_split_struct_duped()
234 btf__add_int(btf1, "int", 4, BTF_INT_SIGNED); /* [1] int */ in test_split_struct_duped()
235 btf__add_ptr(btf1, 5); /* [2] ptr to struct s1 */ in test_split_struct_duped()
236 btf__add_fwd(btf1, "s2", BTF_FWD_STRUCT); /* [3] fwd for struct s2 */ in test_split_struct_duped()
237 btf__add_ptr(btf1, 3); /* [4] ptr to fwd struct s2 */ in test_split_struct_duped()
238 btf__add_struct(btf1, "s1", 16); /* [5] struct s1 { */ in test_split_struct_duped()
239 btf__add_field(btf1, "f1", 2, 0, 0); /* struct s1 *f1; */ in test_split_struct_duped()
240 btf__add_field(btf1, "f2", 4, 64, 0); /* struct s2 *f2; */ in test_split_struct_duped()
244 btf1, in test_split_struct_duped()
253 btf2 = btf__new_empty_split(btf1); in test_split_struct_duped()
329 btf__free(btf1); in test_split_struct_duped()
358 struct btf *btf1, *btf2 = NULL; in test_split_dup_struct_in_cu() local
362 btf1 = btf__new_empty(); in test_split_dup_struct_in_cu()
363 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_dup_struct_in_cu()
366 btf_add_dup_struct_in_cu(btf1, 0); in test_split_dup_struct_in_cu()
369 btf1, in test_split_dup_struct_in_cu()
382 err = btf__dedup(btf1, NULL); in test_split_dup_struct_in_cu()
387 btf1, in test_split_dup_struct_in_cu()
397 btf2 = btf__new_empty_split(btf1); in test_split_dup_struct_in_cu()
440 btf__free(btf1); in test_split_dup_struct_in_cu()