Lines Matching refs:btf

125 			       struct btf *btf,  in codegen_datasec_def()  argument
130 const char *sec_name = btf__name_by_offset(btf, sec->name_off); in codegen_datasec_def()
144 const struct btf_type *var = btf__type_by_id(btf, sec_var->type); in codegen_datasec_def()
145 const char *var_name = btf__name_by_offset(btf, var->name_off); in codegen_datasec_def()
164 align = btf__align_of(btf, var->type); in codegen_datasec_def()
212 static const struct btf_type *find_type_for_map(struct btf *btf, const char *map_ident) in find_type_for_map() argument
214 int n = btf__type_cnt(btf), i; in find_type_for_map()
218 const struct btf_type *t = btf__type_by_id(btf, i); in find_type_for_map()
224 name = btf__str_by_offset(btf, t->name_off); in find_type_for_map()
247 struct btf *btf = bpf_object__btf(obj); in codegen_datasecs() local
254 d = btf_dump__new(btf, codegen_btf_dump_printf, NULL, NULL); in codegen_datasecs()
264 sec = find_type_for_map(btf, map_ident); in codegen_datasecs()
277 err = codegen_datasec_def(obj, btf, d, sec, obj_name); in codegen_datasecs()
289 static bool btf_is_ptr_to_func_proto(const struct btf *btf, in btf_is_ptr_to_func_proto() argument
292 return btf_is_ptr(v) && btf_is_func_proto(btf__type_by_id(btf, v->type)); in btf_is_ptr_to_func_proto()
297 struct btf *btf = bpf_object__btf(obj); in codegen_subskel_datasecs() local
308 d = btf_dump__new(btf, codegen_btf_dump_printf, NULL, NULL); in codegen_subskel_datasecs()
317 sec = find_type_for_map(btf, map_ident); in codegen_subskel_datasecs()
321 sec_name = btf__name_by_offset(btf, sec->name_off); in codegen_subskel_datasecs()
338 var = btf__type_by_id(btf, sec_var->type); in codegen_subskel_datasecs()
339 var_name = btf__name_by_offset(btf, var->name_off); in codegen_subskel_datasecs()
349 var = skip_mods_and_typedefs(btf, var->type, NULL); in codegen_subskel_datasecs()
358 needs_typeof = btf_is_array(var) || btf_is_ptr_to_func_proto(btf, var); in codegen_subskel_datasecs()
470 struct btf *btf = bpf_object__btf(obj); in codegen_asserts() local
477 if (!btf) in codegen_asserts()
494 sec = find_type_for_map(btf, map_ident); in codegen_asserts()
504 const struct btf_type *var = btf__type_by_id(btf, sec_var->type); in codegen_asserts()
505 const char *var_name = btf__name_by_offset(btf, var->name_off); in codegen_asserts()
512 var_size = btf__resolve_size(btf, var->type); in codegen_asserts()
919 struct btf *btf; in do_skeleton() local
1074 btf = bpf_object__btf(obj); in do_skeleton()
1075 if (btf) { in do_skeleton()
1289 struct btf *btf; in do_subskeleton() local
1366 btf = bpf_object__btf(obj); in do_subskeleton()
1367 if (!btf) { in do_subskeleton()
1396 map_type = btf__type_by_id(btf, map_type_id); in do_subskeleton()
1401 var_type = btf__type_by_id(btf, var->type); in do_subskeleton()
1514 map_type = btf__type_by_id(btf, map_type_id); in do_subskeleton()
1518 var_type = btf__type_by_id(btf, var->type); in do_subskeleton()
1519 var_name = btf__name_by_offset(btf, var_type->name_off); in do_subskeleton()
1636 static int btf_save_raw(const struct btf *btf, const char *path) in btf_save_raw() argument
1643 data = btf__raw_data(btf, &data_sz); in btf_save_raw()
1659 struct btf *src_btf;
1660 struct btf *marked_btf; /* btf structure used to mark used types */
1808 struct btf *btf = info->src_btf; in btfgen_record_field_relo() local
1816 btf_type = btf__type_by_id(btf, type_id); in btfgen_record_field_relo()
1826 btf_type = btf__type_by_id(btf, type_id); in btfgen_record_field_relo()
1840 btf_type = btf__type_by_id(btf, type_id); in btfgen_record_field_relo()
1848 btf_type = btf__type_by_id(btf, type_id); in btfgen_record_field_relo()
1871 struct btf *btf = info->src_btf; in btfgen_mark_type_match() local
1878 btf_type = btf__type_by_id(btf, type_id); in btfgen_mark_type_match()
2003 btfgen_find_cands(const struct btf *local_btf, const struct btf *targ_btf, __u32 local_id) in btfgen_find_cands()
2012 local_cand.btf = local_btf; in btfgen_find_cands()
2054 struct btf *btf = NULL; in btfgen_record_obj() local
2058 btf = btf__parse(obj_path, &btf_ext); in btfgen_record_obj()
2059 if (!btf) { in btfgen_record_obj()
2090 const char *sec_name = btf__name_by_offset(btf, sec->sec_name_off); in btfgen_record_obj()
2094 cands = btfgen_find_cands(btf, info->src_btf, relo->type_id); in btfgen_record_obj()
2105 err = bpf_core_calc_relo_insn(sec_name, relo, relo_idx, btf, cands, in btfgen_record_obj()
2118 btf__free(btf); in btfgen_record_obj()
2141 static struct btf *btfgen_get_btf(struct btfgen_info *info) in btfgen_get_btf()
2143 struct btf *btf_new = NULL; in btfgen_get_btf()
2261 struct btf *btf_new = NULL; in minimize_btf()