Home
last modified time | relevance | path

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

123

/openbmc/linux/tools/lib/bpf/
H A Dbtf.c31 struct btf { struct
97 struct btf *base_btf; argument
192 static void *btf_add_type_offs_mem(struct btf *btf, size_t add_cnt) in btf_add_type_offs_mem() argument
198 static int btf_add_type_idx_entry(struct btf *bt argument
33 raw_databtf global() argument
35 raw_data_swappedbtf global() argument
36 raw_sizebtf global() argument
60 swapped_endianbtf global() argument
77 hdrbtf global() argument
102 start_idbtf global() argument
107 start_str_offbtf global() argument
113 strs_databtf global() argument
115 strs_setbtf global() argument
117 strs_dedupedbtf global() argument
120 fdbtf global() argument
123 ptr_szbtf global() argument
220 btf_parse_hdr(struct btf * btf) btf_parse_hdr() argument
269 btf_parse_str_sec(struct btf * btf) btf_parse_str_sec() argument
413 btf_parse_type_sec(struct btf * btf) btf_parse_type_sec() argument
451 btf__type_cnt(const struct btf * btf) btf__type_cnt() argument
456 btf__base_btf(const struct btf * btf) btf__base_btf() argument
462 btf_type_by_id(const struct btf * btf,__u32 type_id) btf_type_by_id() argument
471 btf__type_by_id(const struct btf * btf,__u32 type_id) btf__type_by_id() argument
478 determine_ptr_size(const struct btf * btf) determine_ptr_size() argument
522 btf_ptr_sz(const struct btf * btf) btf_ptr_sz() argument
537 btf__pointer_size(const struct btf * btf) btf__pointer_size() argument
552 btf__set_pointer_size(struct btf * btf,size_t ptr_sz) btf__set_pointer_size() argument
571 btf__endianness(const struct btf * btf) btf__endianness() argument
579 btf__set_endianness(struct btf * btf,enum btf_endianness endian) btf__set_endianness() argument
604 btf__resolve_size(const struct btf * btf,__u32 type_id) btf__resolve_size() argument
659 btf__align_of(const struct btf * btf,__u32 id) btf__align_of() argument
714 btf__resolve_type(const struct btf * btf,__u32 type_id) btf__resolve_type() argument
734 btf__find_by_name(const struct btf * btf,const char * type_name) btf__find_by_name() argument
752 btf_find_by_name_kind(const struct btf * btf,int start_id,const char * type_name,__u32 kind) btf_find_by_name_kind() argument
774 btf__find_by_name_kind_own(const struct btf * btf,const char * type_name,__u32 kind) btf__find_by_name_kind_own() argument
780 btf__find_by_name_kind(const struct btf * btf,const char * type_name,__u32 kind) btf__find_by_name_kind() argument
786 btf_is_modifiable(const struct btf * btf) btf_is_modifiable() argument
791 btf__free(struct btf * btf) btf__free() argument
818 struct btf *btf; btf_new_empty() local
869 struct btf *btf; btf_new() local
927 struct btf *btf = NULL; btf_parse_elf() local
1060 struct btf *btf = NULL; btf_parse_raw() local
1133 struct btf *btf; btf_parse() local
1160 btf_load_into_kernel(struct btf * btf,char * log_buf,size_t log_sz,__u32 log_level) btf_load_into_kernel() argument
1235 btf__load_into_kernel(struct btf * btf) btf__load_into_kernel() argument
1240 btf__fd(const struct btf * btf) btf__fd() argument
1245 btf__set_fd(struct btf * btf,int fd) btf__set_fd() argument
1250 btf_strs_data(const struct btf * btf) btf_strs_data() argument
1255 btf_get_raw_data(const struct btf * btf,__u32 * size,bool swap_endian) btf_get_raw_data() argument
1307 struct btf *btf = (struct btf *)btf_ro; btf__raw_data() local
1327 btf__str_by_offset(const struct btf * btf,__u32 offset) btf__str_by_offset() argument
1337 btf__name_by_offset(const struct btf * btf,__u32 offset) btf__name_by_offset() argument
1347 struct btf *btf; btf_get_from_fd() local
1398 struct btf *btf; btf__load_from_kernel_by_id_split() local
1416 btf_invalidate_raw_data(struct btf * btf) btf_invalidate_raw_data() argument
1432 btf_ensure_modifiable(struct btf * btf) btf_ensure_modifiable() argument
1492 btf__find_str(struct btf * btf,const char * s) btf__find_str() argument
1518 btf__add_str(struct btf * btf,const char * s) btf__add_str() argument
1540 btf_add_type_mem(struct btf * btf,size_t add_sz) btf_add_type_mem() argument
1551 btf_commit_type(struct btf * btf,int data_sz) btf_commit_type() argument
1603 btf__add_type(struct btf * btf,const struct btf * src_btf,const struct btf_type * src_type) btf__add_type() argument
1632 struct btf *btf = ctx; btf_rewrite_type_ids() local
1648 btf__add_btf(struct btf * btf,const struct btf * src_btf) btf__add_btf() argument
1757 btf__add_int(struct btf * btf,const char * name,size_t byte_sz,int encoding) btf__add_int() argument
1805 btf__add_float(struct btf * btf,const char * name,size_t byte_sz) btf__add_float() argument
1850 btf_add_ref_kind(struct btf * btf,int kind,const char * name,int ref_type_id) btf_add_ref_kind() argument
1886 btf__add_ptr(struct btf * btf,int ref_type_id) btf__add_ptr() argument
1900 btf__add_array(struct btf * btf,int index_type_id,int elem_type_id,__u32 nr_elems) btf__add_array() argument
1930 btf_add_composite(struct btf * btf,int kind,const char * name,__u32 bytes_sz) btf_add_composite() argument
1971 btf__add_struct(struct btf * btf,const char * name,__u32 byte_sz) btf__add_struct() argument
1989 btf__add_union(struct btf * btf,const char * name,__u32 byte_sz) btf__add_union() argument
1994 btf_last_type(struct btf * btf) btf_last_type() argument
2009 btf__add_field(struct btf * btf,const char * name,int type_id,__u32 bit_offset,__u32 bit_size) btf__add_field() argument
2064 btf_add_enum_common(struct btf * btf,const char * name,__u32 byte_sz,bool is_signed,__u8 kind) btf_add_enum_common() argument
2109 btf__add_enum(struct btf * btf,const char * name,__u32 byte_sz) btf__add_enum() argument
2126 btf__add_enum_value(struct btf * btf,const char * name,__s64 value) btf__add_enum_value() argument
2188 btf__add_enum64(struct btf * btf,const char * name,__u32 byte_sz,bool is_signed) btf__add_enum64() argument
2203 btf__add_enum64_value(struct btf * btf,const char * name,__u64 value) btf__add_enum64_value() argument
2255 btf__add_fwd(struct btf * btf,const char * name,enum btf_fwd_kind fwd_kind) btf__add_fwd() argument
2291 btf__add_typedef(struct btf * btf,const char * name,int ref_type_id) btf__add_typedef() argument
2306 btf__add_volatile(struct btf * btf,int ref_type_id) btf__add_volatile() argument
2318 btf__add_const(struct btf * btf,int ref_type_id) btf__add_const() argument
2330 btf__add_restrict(struct btf * btf,int ref_type_id) btf__add_restrict() argument
2343 btf__add_type_tag(struct btf * btf,const char * value,int ref_type_id) btf__add_type_tag() argument
2359 btf__add_func(struct btf * btf,const char * name,enum btf_func_linkage linkage,int proto_type_id) btf__add_func() argument
2391 btf__add_func_proto(struct btf * btf,int ret_type_id) btf__add_func_proto() argument
2425 btf__add_func_param(struct btf * btf,const char * name,int type_id) btf__add_func_param() argument
2478 btf__add_var(struct btf * btf,const char * name,int linkage,int type_id) btf__add_var() argument
2528 btf__add_datasec(struct btf * btf,const char * name,__u32 byte_sz) btf__add_datasec() argument
2567 btf__add_datasec_var_info(struct btf * btf,int var_type_id,__u32 offset,__u32 byte_sz) btf__add_datasec_var_info() argument
2615 btf__add_decl_tag(struct btf * btf,const char * value,int ref_type_id,int component_idx) btf__add_decl_tag() argument
3039 btf__dedup(struct btf * btf,const struct btf_dedup_opts * opts) btf__dedup() argument
3109 struct btf *btf; global() member
3215 btf_dedup_new(struct btf * btf,const struct btf_dedup_opts * opts) btf_dedup_new() argument
4783 struct btf *btf; btf__load_vmlinux_btf() local
[all...]
H A Drelo_core.h10 const struct btf *btf; member
30 const struct btf *btf; member
H A Drelo_core.c22 skip_mods_and_typedefs(const struct btf *btf, u32 id, u32 *res_id) in skip_mods_and_typedefs()
27 static const char *btf__name_by_offset(const struct btf *btf, u32 offset) in btf__name_by_offset()
32 static s64 btf__resolve_size(const struct btf *btf, u32 type_id) in btf__resolve_size()
71 static bool is_flex_arr(const struct btf *btf, in is_flex_arr()
263 int bpf_core_parse_spec(const char *prog_name, const struct btf *btf, in bpf_core_parse_spec()
/openbmc/linux/kernel/bpf/
H A Dbtf.c244 struct btf { struct
246 struct btf_type **types; argument
251 struct btf_header hdr; argument
258 struct btf_kfunc_set_tab *kfunc_set_tab; argument
259 struct btf_id_dtor_kfunc_tab *dtor_kfunc_tab; argument
260 struct btf_struct_metas *struct_meta_tab; argument
263 struct btf *base_btf; argument
267 bool kernel_btf; argument
303 struct btf *btf; member
409 const struct btf *btf; member
[all …]
/openbmc/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()
51 struct btf *btf = NULL; in test_btf_dump_case() local
135 struct btf *btf = NULL; in test_btf_dump_incremental() local
269 static int btf_dump_data(struct btf *btf, struct btf_dump *d, in btf_dump_data()
350 static void test_btf_dump_int_data(struct btf *btf, struct btf_dump *d, in test_btf_dump_int_data()
408 static void test_btf_dump_float_data(struct btf *btf, struct btf_dump *d, in test_btf_dump_float_data()
453 static void test_btf_dump_char_data(struct btf *btf, struct btf_dump *d, in test_btf_dump_char_data()
475 static void test_btf_dump_typedef_data(struct btf *btf, struct btf_dump *d, in test_btf_dump_typedef_data()
530 static void test_btf_dump_enum_data(struct btf *btf, struct btf_dump *d, in test_btf_dump_enum_data()
566 static void test_btf_dump_struct_data(struct btf *btf, struct btf_dump *d, in test_btf_dump_struct_data()
[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
163 struct btf *btf; in test_libbpf_bpf_prog_type_str() local
H A Dbtf_write.c7 static void gen_btf(struct btf *btf) in gen_btf()
357 struct btf *btf; in test_btf_add() local
H A Dlinked_list.c240 struct btf *btf; in init_btf() local
266 struct btf *btf; in list_and_rb_node_same_struct() local
318 struct btf *btf = NULL; in test_btf() local
H A Dctx_rewrite.c249 static int find_field_offset_aux(struct btf *btf, int btf_id, char *field_name, int off) in find_field_offset_aux()
288 static int find_field_offset(struct btf *btf, char *pattern, regmatch_t *matches) in find_field_offset()
487 static bool match_pattern(struct btf *btf, char *pattern, char *text, char *reg_map[][2]) in match_pattern()
738 static void match_program(struct btf *btf, in match_program()
801 static void run_one_testcase(struct btf *btf, struct test_case *test) in run_one_testcase()
896 struct btf *btf; in test_ctx_rewrite() local
H A Dlibbpf_probes.c9 struct btf *btf; in test_libbpf_probe_prog_types() local
47 struct btf *btf; in test_libbpf_probe_map_types() local
H A Dtest_bpf_ma.c15 struct btf *btf; in test_test_bpf_ma() local
H A Dbtf_endian.c18 struct btf *btf = NULL, *swap_btf = NULL; in test_btf_endian() local
H A Dbtf_dedup_split.c332 static void btf_add_dup_struct_in_cu(struct btf *btf, int start_id) in btf_add_dup_struct_in_cu()
/openbmc/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()
/openbmc/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
/openbmc/linux/tools/perf/util/
H A Dbpf-event.c97 struct btf *btf) in perf_env__fetch_btf()
123 struct btf *btf, in synthesize_bpf_prog_name()
176 struct btf *btf = NULL; in perf_event__synthesize_one_bpf_prog() local
454 struct btf *btf = NULL; in perf_env__add_bpf_info() local
558 struct btf *btf = NULL; in __bpf_event__print_bpf_prog_info() local
/openbmc/linux/tools/bpf/bpftool/
H A Dgen.c125 struct btf *btf, in codegen_datasec_def()
212 static const struct btf_type *find_type_for_map(struct btf *btf, const char *map_ident) in find_type_for_map()
247 struct btf *btf = bpf_object__btf(obj); in codegen_datasecs() local
288 static bool btf_is_ptr_to_func_proto(const struct btf *btf, in btf_is_ptr_to_func_proto()
296 struct btf *btf = bpf_object__btf(obj); in codegen_subskel_datasecs() local
469 struct btf *btf = bpf_object__btf(obj); in codegen_asserts() local
918 struct btf *btf; in do_skeleton() local
1290 struct btf *btf; in do_subskeleton() local
1637 static int btf_save_raw(const struct btf *btf, const char *path) in btf_save_raw()
1804 struct btf *btf = info->src_btf; in btfgen_record_field_relo() local
[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 Dbtf.c90 static const char *btf_str(const struct btf *btf, __u32 off) in btf_str()
102 static int dump_btf_type(const struct btf *btf, __u32 id, in dump_btf_type()
418 static int dump_btf_raw(const struct btf *btf, in dump_btf_raw()
463 static int dump_btf_c(const struct btf *btf, in dump_btf_c()
552 struct btf *btf = NULL, *base = NULL; in do_dump() local
H A Dmap.c133 unsigned char *value, struct btf *btf) in print_entry_json()
743 struct bpf_map_info *map_info, struct btf *btf, in dump_map_elem()
790 static int get_map_kv_btf(const struct bpf_map_info *info, struct btf **btf) in get_map_kv_btf()
816 static void free_map_kv_btf(struct btf *btf) in free_map_kv_btf()
828 struct btf *btf = NULL; in map_dump() local
1035 struct btf *btf; in print_key_value() local
H A Dxlated_dumper.c230 struct btf *btf = dd->btf; in dump_xlated_json() local
315 struct btf *btf = dd->btf; in dump_xlated_plain() local
383 struct btf *btf = dd->btf; in dump_xlated_for_graph() local
H A Dmain.h188 const struct btf *btf, in disasm_print_insn()
210 const struct btf *btf; member
/openbmc/linux/include/linux/
H A Dbtf.h511 static inline const struct btf_type *btf_type_by_id(const struct btf *btf, in btf_type_by_id()
516 static inline const char *btf_name_by_offset(const struct btf *btf, in btf_name_by_offset()
521 static inline u32 *btf_kfunc_id_set_contains(const struct btf *btf, in btf_kfunc_id_set_contains()
533 static inline s32 btf_find_dtor_kfunc(struct btf *btf, u32 btf_id) in btf_find_dtor_kfunc()
542 static inline struct btf_struct_meta *btf_find_struct_meta(const struct btf *btf, u32 btf_id) in btf_find_struct_meta()
547 btf_get_prog_ctx_type(struct bpf_verifier_log *log, const struct btf *btf, in btf_get_prog_ctx_type()
564 static inline bool btf_type_is_struct_ptr(struct btf *btf, const struct btf_type *t) in btf_type_is_struct_ptr()
/openbmc/linux/kernel/trace/
H A Dtrace_probe.c322 static bool btf_type_is_char_ptr(struct btf *btf, const struct btf_type *type) in btf_type_is_char_ptr()
340 static bool btf_type_is_char_array(struct btf *btf, const struct btf_type *type) in btf_type_is_char_array()
363 struct btf *btf = ctx->btf; in check_prepare_btf_string_fetch() local
393 static const char *fetch_type_from_btf_type(struct btf *btf, in fetch_type_from_btf_type()
451 struct btf *btf; in query_btf_context() local
710 struct btf *btf = ctx->btf; in find_fetch_type_from_btf_type() local

123