Home
last modified time | relevance | path

Searched defs:btf (Results 1 – 25 of 89) sorted by relevance

1234

/linux/tools/lib/bpf/
H A Dbtf.c62 struct btf { struct
87 * A separate struct btf_header is embedded as btf->hdr, argument
119 struct btf_header hdr; argument
141 struct btf *base_btf; argument
163 /* whether base_btf should be freed in btf_free for this instance */ argument
164 bool owns_base;
167 bool raw_data_is_mmap;
170 bool modifiable;
174 bool has_hdr_extra;
178 void *layout;
[all …]
H A Drelo_core.h10 const struct btf *btf; member
30 const struct btf *btf; member
/linux/kernel/bpf/
H A Dbtf.c254 struct btf { struct
256 struct btf_type **types; argument
261 struct btf_header hdr; argument
269 struct btf_kfunc_set_tab *kfunc_set_tab; argument
270 struct btf_id_dtor_kfunc_tab *dtor_kfunc_tab; argument
271 struct btf_struct_metas *struct_meta_tab; argument
272 struct btf_struct_ops_tab *struct_ops_tab; argument
273 struct btf_layout *layout; argument
276 struct btf *base_btf; argument
280 bool kernel_btf; argument
[all …]
H A Dcheck_btf.c40 const struct btf *btf; in prepare_btf_func() local
142 const struct btf *btf; in check_btf_func() local
221 const struct btf *btf; in check_btf_line() local
348 const struct btf *btf = prog->aux->btf; in check_core_relo() local
414 struct btf *btf; in bpf_prepare_btf_info() local
H A Dbpf_struct_ops.c43 struct btf *btf; member
89 static bool is_valid_value_type(struct btf *btf, s32 value_id, in is_valid_value_type()
173 static int prepare_arg_info(struct btf *btf, in prepare_arg_info()
337 static bool is_module_member(const struct btf *btf, u32 id) in is_module_member()
359 struct btf *btf, in bpf_struct_ops_desc_init()
595 static int check_zero_holes(const struct btf *btf, const struct btf_type *t, void *data) in check_zero_holes()
1071 static u32 count_func_ptrs(const struct btf *btf, const struct btf_type *t) in count_func_ptrs()
1092 struct btf *btf; in bpf_struct_ops_map_alloc() local
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbtf_dump.c26 static int btf_dump_all_types(const struct btf *btf, void *ctx) in btf_dump_all_types() argument
51 struct btf *btf = NULL; in test_btf_dump_case() local
130 struct btf *btf; global() member
184 struct btf *btf; test_btf_dump_incremental() local
285 struct btf *btf; test_btf_dump_type_tags() local
339 btf_dump_data(struct btf * btf,struct btf_dump * d,char * name,char * prefix,__u64 flags,void * ptr,size_t ptr_sz,char * str,const char * expected_val) btf_dump_data() argument
420 test_btf_dump_int_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_int_data() argument
478 test_btf_dump_float_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_float_data() argument
523 test_btf_dump_char_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_char_data() argument
545 test_btf_dump_typedef_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_typedef_data() argument
600 test_btf_dump_enum_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_enum_data() argument
636 test_btf_dump_struct_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_struct_data() argument
871 test_btf_dump_var_data(struct btf * btf,struct btf_dump * d,char * str) test_btf_dump_var_data() argument
883 struct btf *btf; global() member
998 test_btf_datasec(struct btf * btf,struct btf_dump * d,char * str,const char * name,const char * expected_val,void * data,size_t data_sz) test_btf_datasec() argument
1026 struct btf *btf; test_btf_dump_datasec_data() local
1049 struct btf *btf; test_btf_dump() local
[all...]
H A Dlibbpf_str.c23 struct btf *btf; in test_libbpf_bpf_attach_type_str() local
68 struct btf *btf; in test_libbpf_bpf_link_type_str() local
113 struct btf *btf; in test_libbpf_bpf_map_type_str() local
170 struct btf *btf; in test_libbpf_bpf_prog_type_str() local
H A Dresolve_btfids.c183 static int resolve_symbols(struct btf *btf) in resolve_symbols()
195 static bool btf_has_decl_tag(struct btf *btf, const char *tag_name, s32 target_id) in btf_has_decl_tag()
243 static bool is_arena_tagged_ptr(struct btf *btf, __u32 id) in is_arena_tagged_ptr()
262 struct btf *btf; in test_resolve_btfids() local
H A Dctx_rewrite.c252 static int find_field_offset_aux(struct btf *btf, int btf_id, char *field_name, int off) in find_field_offset_aux() argument
291 find_field_offset(struct btf * btf,char * pattern,regmatch_t * matches) find_field_offset() argument
492 match_pattern(struct btf * btf,char * pattern,char * text,char * reg_map[][2]) match_pattern() argument
642 match_program(struct btf * btf,struct prog_info * pinfo,char * pattern,char * reg_map[][2],bool skip_first_insn) match_program() argument
707 run_one_testcase(struct btf * btf,struct test_case * test) run_one_testcase() argument
802 struct btf *btf; test_ctx_rewrite() local
[all...]
H A Dbtf_write.c7 static void gen_btf(struct btf *btf) in gen_btf() argument
357 struct btf *btf; test_btf_add() local
[all...]
H A Dlinked_list.c255 struct btf *btf; in init_btf() local
281 struct btf *btf; in list_and_rb_node_same_struct() local
333 struct btf *btf = NULL; in test_btf() local
H A Dtest_global_funcs.c26 check_ctx_arg_type(const struct btf * btf,const struct btf_param * p) check_ctx_arg_type() argument
47 struct btf *btf = NULL; subtest_ctx_arg_rewrite() local
[all...]
H A Dlibbpf_probes.c9 struct btf *btf; in test_libbpf_probe_prog_types() local
49 struct btf *btf; in test_libbpf_probe_map_types() local
/linux/kernel/bpf/preload/iterators/
H A Diterators.bpf.c34 struct btf { struct
36 struct btf_type **types; argument
37 struct btf_header hdr; argument
46 struct btf *btf; argument
59 static const char *get_name(struct btf *btf, long btf_id, const char *fallback) in get_name()
/linux/tools/testing/selftests/bpf/
H A Dbtf_helpers.c81 static const char *btf_str(const struct btf *btf, __u32 off) in btf_str()
88 int fprintf_btf_type_raw(FILE *out, const struct btf *btf, __u32 id) in fprintf_btf_type_raw()
216 const char *btf_type_raw_dump(const struct btf *btf, int type_id) in btf_type_raw_dump()
234 int btf_validate_raw(struct btf *btf, int nr_types, const char *exp_types[]) in btf_validate_raw()
257 const char *btf_type_c_dump(const struct btf *btf) in btf_type_c_dump()
H A Dbtf_helpers.h13 #define VALIDATE_RAW_BTF(btf, raw_types...) \ argument
/linux/tools/bpf/bpftool/
H A Dbtf.c108 static const char *btf_str(const struct btf *btf, __u32 off) in btf_str()
120 static int dump_btf_type(const struct btf *btf, __u32 id, in dump_btf_type()
430 static int dump_btf_raw(const struct btf *btf, in dump_btf_raw()
499 struct btf *btf = ctx; in cmp_kfuncs() local
507 static int dump_btf_kfuncs(struct btf_dump *d, const struct btf *btf) in dump_btf_kfuncs()
584 static int btf_type_rank(const struct btf *btf, __u32 index, bool has_name) in btf_type_rank()
624 static const char *btf_type_sort_name(const struct btf *btf, __u32 index, bool from_ref) in btf_type_sort_name()
661 static __u64 btf_name_hasher(__u64 hash, const struct btf *btf, __u32 name_off) in btf_name_hasher()
669 static __u64 btf_type_disambig_hash(const struct btf *btf, __u32 id, bool include_members) in btf_type_disambig_hash()
740 static struct sort_datum *sort_btf_c(const struct btf *btf) in sort_btf_c()
[all …]
H A Dgen.c59 resolve_func_ptr(const struct btf *btf, __u32 id, __u32 *res_id) in resolve_func_ptr()
154 struct btf *btf, in codegen_datasec_def()
241 static const struct btf_type *find_type_for_map(struct btf *btf, const char *map_ident) in find_type_for_map()
294 struct btf *btf = bpf_object__btf(obj); in codegen_datasecs() local
335 static bool btf_is_ptr_to_func_proto(const struct btf *btf, in btf_is_ptr_to_func_proto()
343 struct btf *btf = bpf_object__btf(obj); in codegen_subskel_datasecs() local
516 struct btf *btf = bpf_object__btf(obj); in codegen_asserts() local
1046 static int walk_st_ops_shadow_vars(struct btf *btf, const char *ident, in walk_st_ops_shadow_vars()
1161 static int gen_st_ops_shadow_type(const char *obj_name, struct btf *btf, const char *ident, in gen_st_ops_shadow_type()
1189 static int gen_st_ops_shadow(const char *obj_name, struct btf *btf, struct bpf_object *obj) in gen_st_ops_shadow()
[all …]
H A Dbtf_dumper.c211 static bool is_str_array(const struct btf *btf, const struct btf_array *arr, in is_str_array()
619 static int __btf_dumper_type_only(const struct btf *btf, __u32 type_id, in __btf_dumper_type_only()
710 static int btf_dump_func(const struct btf *btf, char *func_sig, 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()
769 void btf_dump_linfo_plain(const struct btf *btf, in btf_dump_linfo_plain()
801 void btf_dump_linfo_json(const struct btf *btf, in btf_dump_linfo_json()
874 void btf_dump_linfo_dotlabel(const struct btf *btf, in btf_dump_linfo_dotlabel()
H A Dmap.c133 unsigned char *value, struct btf *btf) in print_entry_json()
744 struct bpf_map_info *map_info, struct btf *btf, in dump_map_elem()
797 static int get_map_kv_btf(const struct bpf_map_info *info, struct btf **btf) in get_map_kv_btf()
823 static void free_map_kv_btf(struct btf *btf) in free_map_kv_btf()
835 struct btf *btf = NULL; in map_dump() local
1042 struct btf *btf; in print_key_value() local
H A Dxlated_dumper.c217 struct btf *btf = dd->btf; in dump_xlated_json() local
302 struct btf *btf = dd->btf; in dump_xlated_plain() local
371 struct btf *btf = dd->btf; in dump_xlated_for_graph() local
/linux/include/linux/
H A Dbtf.h544 static inline const struct bpf_struct_ops_desc *bpf_struct_ops_find(struct btf *btf, u32 type_id) in bpf_struct_ops_find()
605 static inline bool btf_type_is_struct_ptr(struct btf *btf, const struct btf_type *t) in btf_type_is_struct_ptr()
615 static inline const struct btf_type *btf_type_by_id(const struct btf *btf, in btf_type_by_id()
621 static inline void btf_set_base_btf(struct btf *btf, const struct btf *base_btf) in btf_set_base_btf()
625 static inline int btf_relocate(void *log, struct btf *btf, const struct btf *base_btf, in btf_relocate()
642 static inline const char *btf_name_by_offset(const struct btf *btf, in btf_name_by_offset()
647 static inline u32 *btf_kfunc_id_set_contains(const struct btf *btf, in btf_kfunc_id_set_contains()
659 static inline s32 btf_find_dtor_kfunc(struct btf *btf, u32 btf_id) in btf_find_dtor_kfunc()
668 static inline struct btf_struct_meta *btf_find_struct_meta(const struct btf *btf, u32 btf_id) in btf_find_struct_meta()
673 btf_is_prog_ctx_type(struct bpf_verifier_log *log, const struct btf *btf, in btf_is_prog_ctx_type()
[all …]
/linux/tools/bpf/resolve_btfids/
H A Dmain.c143 struct btf *btf; member
196 struct btf *btf; member
682 struct btf *base_btf = NULL, *btf = NULL; in load_btf() local
722 struct btf *btf = obj->btf; in symbols_resolve() local
961 static int dump_raw_btf(struct btf *btf, const char *out_path) in dump_raw_btf()
980 static const struct btf_type *btf_type_skip_qualifiers(const struct btf *btf, s32 type_id) in btf_type_skip_qualifiers()
1056 struct btf *btf = ctx->btf; in collect_decl_tags() local
1080 static bool is_arena_param(const struct btf *btf, const struct btf_param *param) in is_arena_param()
1091 struct btf *btf = ctx->btf; in collect_kfuncs() local
1170 static bool is_kf_implicit_arg(const struct btf *btf, const struct btf_param *p) in is_kf_implicit_arg()
[all …]
/linux/tools/perf/util/
H A Dbpf-event.c106 perf_env__fetch_btf(struct perf_env * env,u32 btf_id,struct btf * btf) perf_env__fetch_btf() argument
132 synthesize_bpf_prog_name(char * buf,int size,struct bpf_prog_info * info,struct btf * btf,u32 sub_id) synthesize_bpf_prog_name() argument
176 struct btf *btf; global() member
189 struct btf *btf; bpf_metadata_read_map_data() local
279 format_btf_variable(struct btf * btf,char * buf,size_t buf_size,const struct btf_type * t,const void * btf_data) format_btf_variable() argument
542 struct btf *btf = NULL; perf_event__synthesize_one_bpf_prog() local
838 struct btf *btf = NULL; perf_env__add_bpf_info() local
953 struct btf *btf = NULL; __bpf_event__print_bpf_prog_info() local
[all...]
/linux/io_uring/
H A Dbpf-ops.c110 io_lookup_struct_type(struct btf *btf, const char *name) in io_lookup_struct_type()
120 static int bpf_io_init(struct btf *btf) in bpf_io_init()

1234