Lines Matching refs:btf
27 static int btf_dump_func(const struct btf *btf, char *func_sig,
40 struct btf *prog_btf = NULL; in dump_prog_id_as_func_ptr()
47 func_sig_len = btf_dump_func(d->btf, prog_str, func_proto, NULL, 0, in dump_prog_id_as_func_ptr()
118 ptr_type_id = btf__resolve_type(d->btf, t->type); in btf_dumper_ptr()
121 ptr_type = btf__type_by_id(d->btf, ptr_type_id); in btf_dumper_ptr()
140 actual_type_id = btf__resolve_type(d->btf, type_id); in btf_dumper_modifier()
175 btf__name_by_offset(d->btf, in btf_dumper_enum()
201 btf__name_by_offset(d->btf, in btf_dumper_enum64()
211 static bool is_str_array(const struct btf *btf, const struct btf_array *arr, in is_str_array() argument
220 elem_type = btf__type_by_id(btf, arr->type); in is_str_array()
225 elem_type = btf__type_by_id(btf, elem_type->type); in is_str_array()
231 strcmp("char", btf__name_by_offset(btf, elem_type->name_off))) in is_str_array()
250 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_array()
256 if (is_str_array(d->btf, arr, data)) { in btf_dumper_array()
261 elem_size = btf__resolve_size(d->btf, arr->type); in btf_dumper_array()
475 t = btf__type_by_id(d->btf, type_id); in btf_dumper_struct()
493 jsonw_name(d->jw, btf__name_by_offset(d->btf, m[i].name_off)); in btf_dumper_struct()
516 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_var()
520 jsonw_name(d->jw, btf__name_by_offset(d->btf, t->name_off)); in btf_dumper_var()
534 t = btf__type_by_id(d->btf, type_id); in btf_dumper_datasec()
542 jsonw_name(d->jw, btf__name_by_offset(d->btf, t->name_off)); in btf_dumper_datasec()
558 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_do_type()
613 pos = __btf_dumper_type_only(btf, type, func_sig, \
619 static int __btf_dumper_type_only(const struct btf *btf, __u32 type_id, in __btf_dumper_type_only() argument
632 t = btf__type_by_id(btf, type_id); in __btf_dumper_type_only()
638 BTF_PRINT_ARG("%s ", btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
642 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
646 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
651 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
665 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
680 pos = btf_dump_func(btf, func_sig, t, NULL, pos, size); in __btf_dumper_type_only()
685 proto_type = btf__type_by_id(btf, t->type); in __btf_dumper_type_only()
686 pos = btf_dump_func(btf, func_sig, proto_type, t, pos, size); in __btf_dumper_type_only()
696 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
700 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
710 static int btf_dump_func(const struct btf *btf, char *func_sig, in btf_dump_func() argument
718 BTF_PRINT_ARG("%s(", btf__name_by_offset(btf, func->name_off)); in btf_dump_func()
731 btf__name_by_offset(btf, arg->name_off)); in btf_dump_func()
747 void btf_dumper_type_only(const struct btf *btf, __u32 type_id, char *func_sig, in btf_dumper_type_only() argument
753 if (!btf) in btf_dumper_type_only()
756 err = __btf_dumper_type_only(btf, type_id, func_sig, 0, size); in btf_dumper_type_only()
769 void btf_dump_linfo_plain(const struct btf *btf, in btf_dump_linfo_plain() argument
773 const char *line = btf__name_by_offset(btf, linfo->line_off); in btf_dump_linfo_plain()
783 const char *file = btf__name_by_offset(btf, linfo->file_name_off); in btf_dump_linfo_plain()
801 void btf_dump_linfo_json(const struct btf *btf, in btf_dump_linfo_json() argument
804 const char *line = btf__name_by_offset(btf, linfo->line_off); in btf_dump_linfo_json()
810 const char *file = btf__name_by_offset(btf, linfo->file_name_off); in btf_dump_linfo_json()
874 void btf_dump_linfo_dotlabel(const struct btf *btf, in btf_dump_linfo_dotlabel() argument
877 const char *line = btf__name_by_offset(btf, linfo->line_off); in btf_dump_linfo_dotlabel()
884 const char *file = btf__name_by_offset(btf, linfo->file_name_off); in btf_dump_linfo_dotlabel()