Lines Matching refs:btf

27 static int btf_dump_func(const struct btf *btf, char *func_sig,
39 struct btf *prog_btf = NULL; in dump_prog_id_as_func_ptr()
45 func_sig_len = btf_dump_func(d->btf, prog_str, func_proto, NULL, 0, in dump_prog_id_as_func_ptr()
108 ptr_type_id = btf__resolve_type(d->btf, t->type); in btf_dumper_ptr()
111 ptr_type = btf__type_by_id(d->btf, ptr_type_id); in btf_dumper_ptr()
130 actual_type_id = btf__resolve_type(d->btf, type_id); in btf_dumper_modifier()
165 btf__name_by_offset(d->btf, in btf_dumper_enum()
175 static bool is_str_array(const struct btf *btf, const struct btf_array *arr, in is_str_array() argument
184 elem_type = btf__type_by_id(btf, arr->type); in is_str_array()
189 elem_type = btf__type_by_id(btf, elem_type->type); in is_str_array()
195 strcmp("char", btf__name_by_offset(btf, elem_type->name_off))) in is_str_array()
214 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_array()
220 if (is_str_array(d->btf, arr, data)) { in btf_dumper_array()
225 elem_size = btf__resolve_size(d->btf, arr->type); in btf_dumper_array()
439 t = btf__type_by_id(d->btf, type_id); in btf_dumper_struct()
457 jsonw_name(d->jw, btf__name_by_offset(d->btf, m[i].name_off)); in btf_dumper_struct()
480 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_var()
484 jsonw_name(d->jw, btf__name_by_offset(d->btf, t->name_off)); in btf_dumper_var()
498 t = btf__type_by_id(d->btf, type_id); in btf_dumper_datasec()
506 jsonw_name(d->jw, btf__name_by_offset(d->btf, t->name_off)); in btf_dumper_datasec()
522 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_do_type()
575 pos = __btf_dumper_type_only(btf, type, func_sig, \
581 static int __btf_dumper_type_only(const struct btf *btf, __u32 type_id, in __btf_dumper_type_only() argument
594 t = btf__type_by_id(btf, type_id); in __btf_dumper_type_only()
599 BTF_PRINT_ARG("%s ", btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
603 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
607 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
611 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
625 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
640 pos = btf_dump_func(btf, func_sig, t, NULL, pos, size); in __btf_dumper_type_only()
645 proto_type = btf__type_by_id(btf, t->type); in __btf_dumper_type_only()
646 pos = btf_dump_func(btf, func_sig, proto_type, t, pos, size); in __btf_dumper_type_only()
656 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
660 btf__name_by_offset(btf, t->name_off)); in __btf_dumper_type_only()
670 static int btf_dump_func(const struct btf *btf, char *func_sig, in btf_dump_func() argument
678 BTF_PRINT_ARG("%s(", btf__name_by_offset(btf, func->name_off)); in btf_dump_func()
691 btf__name_by_offset(btf, arg->name_off)); in btf_dump_func()
707 void btf_dumper_type_only(const struct btf *btf, __u32 type_id, char *func_sig, in btf_dumper_type_only() argument
713 if (!btf) in btf_dumper_type_only()
716 err = __btf_dumper_type_only(btf, type_id, func_sig, 0, size); in btf_dumper_type_only()
729 void btf_dump_linfo_plain(const struct btf *btf, in btf_dump_linfo_plain() argument
733 const char *line = btf__name_by_offset(btf, linfo->line_off); in btf_dump_linfo_plain()
743 const char *file = btf__name_by_offset(btf, linfo->file_name_off); in btf_dump_linfo_plain()
761 void btf_dump_linfo_json(const struct btf *btf, in btf_dump_linfo_json() argument
764 const char *line = btf__name_by_offset(btf, linfo->line_off); in btf_dump_linfo_json()
770 const char *file = btf__name_by_offset(btf, linfo->file_name_off); in btf_dump_linfo_json()