Lines Matching refs:t
76 static const char *btf_func_linkage_str(const struct btf_type *t) in btf_func_linkage_str() argument
78 switch (btf_vlen(t)) { in btf_func_linkage_str()
103 const struct btf_type *t) in dump_btf_type() argument
106 int kind = btf_kind(t); in dump_btf_type()
112 jsonw_string_field(w, "name", btf_str(btf, t->name_off)); in dump_btf_type()
115 btf_str(btf, t->name_off)); in dump_btf_type()
120 __u32 v = *(__u32 *)(t + 1); in dump_btf_type()
126 jsonw_uint_field(w, "size", t->size); in dump_btf_type()
132 t->size, BTF_INT_OFFSET(v), BTF_INT_BITS(v), in dump_btf_type()
144 jsonw_uint_field(w, "type_id", t->type); in dump_btf_type()
146 printf(" type_id=%u", t->type); in dump_btf_type()
149 const struct btf_array *arr = (const void *)(t + 1); in dump_btf_type()
163 const struct btf_member *m = (const void *)(t + 1); in dump_btf_type()
164 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
168 jsonw_uint_field(w, "size", t->size); in dump_btf_type()
173 printf(" size=%u vlen=%u", t->size, vlen); in dump_btf_type()
179 if (BTF_INFO_KFLAG(t->info)) { in dump_btf_type()
209 const struct btf_enum *v = (const void *)(t + 1); in dump_btf_type()
210 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
214 encoding = btf_kflag(t) ? "SIGNED" : "UNSIGNED"; in dump_btf_type()
217 jsonw_uint_field(w, "size", t->size); in dump_btf_type()
222 printf(" encoding=%s size=%u vlen=%u", encoding, t->size, vlen); in dump_btf_type()
230 if (btf_kflag(t)) in dump_btf_type()
236 if (btf_kflag(t)) in dump_btf_type()
247 const struct btf_enum64 *v = btf_enum64(t); in dump_btf_type()
248 __u16 vlen = btf_vlen(t); in dump_btf_type()
252 encoding = btf_kflag(t) ? "SIGNED" : "UNSIGNED"; in dump_btf_type()
255 jsonw_uint_field(w, "size", t->size); in dump_btf_type()
260 printf(" encoding=%s size=%u vlen=%u", encoding, t->size, vlen); in dump_btf_type()
269 if (btf_kflag(t)) in dump_btf_type()
275 if (btf_kflag(t)) in dump_btf_type()
288 const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union" in dump_btf_type()
298 const char *linkage = btf_func_linkage_str(t); in dump_btf_type()
301 jsonw_uint_field(w, "type_id", t->type); in dump_btf_type()
304 printf(" type_id=%u linkage=%s", t->type, linkage); in dump_btf_type()
309 const struct btf_param *p = (const void *)(t + 1); in dump_btf_type()
310 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
314 jsonw_uint_field(w, "ret_type_id", t->type); in dump_btf_type()
319 printf(" ret_type_id=%u vlen=%u", t->type, vlen); in dump_btf_type()
338 const struct btf_var *v = (const void *)(t + 1); in dump_btf_type()
344 jsonw_uint_field(w, "type_id", t->type); in dump_btf_type()
347 printf(" type_id=%u, linkage=%s", t->type, linkage); in dump_btf_type()
352 const struct btf_var_secinfo *v = (const void *)(t + 1); in dump_btf_type()
354 __u16 vlen = BTF_INFO_VLEN(t->info); in dump_btf_type()
358 jsonw_uint_field(w, "size", t->size); in dump_btf_type()
363 printf(" size=%u vlen=%u", t->size, vlen); in dump_btf_type()
390 jsonw_uint_field(w, "size", t->size); in dump_btf_type()
392 printf(" size=%u", t->size); in dump_btf_type()
396 const struct btf_decl_tag *tag = (const void *)(t + 1); in dump_btf_type()
399 jsonw_uint_field(w, "type_id", t->type); in dump_btf_type()
402 printf(" type_id=%u component_idx=%d", t->type, tag->component_idx); in dump_btf_type()
421 const struct btf_type *t; in dump_btf_raw() local
432 t = btf__type_by_id(btf, root_type_ids[i]); in dump_btf_raw()
433 dump_btf_type(btf, root_type_ids[i], t); in dump_btf_raw()
445 t = btf__type_by_id(btf, i); in dump_btf_raw()
446 dump_btf_type(btf, i, t); in dump_btf_raw()