Lines Matching refs:t

11 static const char *btf_kind_str(const struct btf_type *t)  in btf_kind_str()  argument
13 return btf_type_str(t); in btf_kind_str()
34 const struct btf_type *t; in btf__resolve_size() local
37 t = btf_type_by_id(btf, type_id); in btf__resolve_size()
38 t = btf_resolve_size(btf, t, &size); in btf__resolve_size()
39 if (IS_ERR(t)) in btf__resolve_size()
40 return PTR_ERR(t); in btf__resolve_size()
75 const struct btf_type *t; in is_flex_arr() local
82 t = btf_type_by_id(btf, acc->type_id); in is_flex_arr()
83 return acc->idx == btf_vlen(t) - 1; in is_flex_arr()
269 const struct btf_type *t; in bpf_core_parse_spec() local
305 t = skip_mods_and_typedefs(btf, relo->type_id, &id); in bpf_core_parse_spec()
306 if (!t) in bpf_core_parse_spec()
316 if (!btf_is_any_enum(t) || spec->raw_len > 1 || access_idx >= btf_vlen(t)) in bpf_core_parse_spec()
320 name_off = btf_is_enum(t) ? btf_enum(t)[access_idx].name_off in bpf_core_parse_spec()
321 : btf_enum64(t)[access_idx].name_off; in bpf_core_parse_spec()
335 t = skip_mods_and_typedefs(btf, id, &id); in bpf_core_parse_spec()
336 if (!t) in bpf_core_parse_spec()
342 if (btf_is_composite(t)) { in bpf_core_parse_spec()
346 if (access_idx >= btf_vlen(t)) in bpf_core_parse_spec()
349 bit_offset = btf_member_bit_offset(t, access_idx); in bpf_core_parse_spec()
352 m = btf_members(t) + access_idx; in bpf_core_parse_spec()
365 } else if (btf_is_array(t)) { in bpf_core_parse_spec()
366 const struct btf_array *a = btf_array(t); in bpf_core_parse_spec()
369 t = skip_mods_and_typedefs(btf, a->type, &id); in bpf_core_parse_spec()
370 if (!t) in bpf_core_parse_spec()
387 prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t)); in bpf_core_parse_spec()
685 const struct btf_type *t; in bpf_core_calc_field_relo() local
703 t = btf_type_by_id(spec->btf, acc->type_id); in bpf_core_calc_field_relo()
730 m = btf_members(t) + acc->idx; in bpf_core_calc_field_relo()
733 bit_sz = btf_member_bitfield_size(t, acc->idx); in bpf_core_calc_field_relo()
851 const struct btf_type *t; in bpf_core_calc_enumval_relo() local
860 t = btf_type_by_id(spec->btf, spec->spec[0].type_id); in bpf_core_calc_enumval_relo()
861 if (btf_is_enum(t)) in bpf_core_calc_enumval_relo()
862 *val = btf_enum(t)[spec->spec[0].idx].val; in bpf_core_calc_enumval_relo()
864 *val = btf_enum64_value(btf_enum64(t) + spec->spec[0].idx); in bpf_core_calc_enumval_relo()
1158 const struct btf_type *t; in bpf_core_format_spec() local
1175 t = btf_type_by_id(spec->btf, type_id); in bpf_core_format_spec()
1176 s = btf__name_by_offset(spec->btf, t->name_off); in bpf_core_format_spec()
1180 type_id, btf_kind_str(t), str_is_empty(s) ? "<anon>" : s); in bpf_core_format_spec()
1186 t = skip_mods_and_typedefs(spec->btf, type_id, NULL); in bpf_core_format_spec()
1187 if (btf_is_enum(t)) { in bpf_core_format_spec()
1191 e = btf_enum(t) + spec->raw_spec[0]; in bpf_core_format_spec()
1193 fmt_str = BTF_INFO_KFLAG(t->info) ? "::%s = %d" : "::%s = %u"; in bpf_core_format_spec()
1199 e = btf_enum64(t) + spec->raw_spec[0]; in bpf_core_format_spec()
1201 fmt_str = BTF_INFO_KFLAG(t->info) ? "::%s = %lld" : "::%s = %llu"; in bpf_core_format_spec()