Lines Matching refs:btf

96 static const char *btf_str(const struct btf *btf, __u32 off)  in btf_str()  argument
100 return btf__name_by_offset(btf, off) ? : "(invalid)"; in btf_str()
108 static int dump_btf_type(const struct btf *btf, __u32 id, in dump_btf_type() argument
118 jsonw_string_field(w, "name", btf_str(btf, t->name_off)); in dump_btf_type()
121 btf_str(btf, t->name_off)); in dump_btf_type()
181 const char *name = btf_str(btf, m->name_off); in dump_btf_type()
227 const char *name = btf_str(btf, v->name_off); in dump_btf_type()
277 const char *name = btf_str(btf, p->name_off); in dump_btf_type()
331 if (v->type <= btf__get_nr_types(btf)) { in dump_btf_type()
332 vt = btf__type_by_id(btf, v->type); in dump_btf_type()
335 btf_str(btf, vt->name_off)); in dump_btf_type()
362 static int dump_btf_raw(const struct btf *btf, in dump_btf_raw() argument
376 t = btf__type_by_id(btf, root_type_ids[i]); in dump_btf_raw()
377 dump_btf_type(btf, root_type_ids[i], t); in dump_btf_raw()
380 const struct btf *base; in dump_btf_raw()
381 int cnt = btf__get_nr_types(btf); in dump_btf_raw()
384 base = btf__base_btf(btf); in dump_btf_raw()
389 t = btf__type_by_id(btf, i); in dump_btf_raw()
390 dump_btf_type(btf, i, t); in dump_btf_raw()
407 static int dump_btf_c(const struct btf *btf, in dump_btf_c() argument
413 d = btf_dump__new(btf, NULL, NULL, btf_dump_printf); in dump_btf_c()
431 int cnt = btf__get_nr_types(btf); in dump_btf_c()
453 struct btf *btf = NULL, *base = NULL; in do_dump() local
541 btf = btf__parse_split(*argv, base ?: base_btf); in do_dump()
542 if (IS_ERR(btf)) { in do_dump()
543 err = -PTR_ERR(btf); in do_dump()
544 btf = NULL; in do_dump()
582 if (!btf) { in do_dump()
583 btf = btf__load_from_kernel_by_id_split(btf_id, base_btf); in do_dump()
584 err = libbpf_get_error(btf); in do_dump()
597 err = dump_btf_c(btf, root_type_ids, root_type_cnt); in do_dump()
599 err = dump_btf_raw(btf, root_type_ids, root_type_cnt); in do_dump()
604 btf__free(btf); in do_dump()