Home
last modified time | relevance | path

Searched refs:base_btf (Results 1 – 9 of 9) sorted by relevance

/linux/tools/lib/bpf/
H A Dbtf_relocate.c40 const struct btf *base_btf; member
231 base_t = btf_type_by_id(r->base_btf, id); in btf_relocate_map_distilled_base()
243 base_t = btf_type_by_id(r->base_btf, id); in btf_relocate_map_distilled_base()
249 base_info.name = btf__name_by_offset(r->base_btf, base_t->name_off); in btf_relocate_map_distilled_base()
442 * at base_btf, and type ids, strings adjusted accordingly.
444 int btf_relocate(struct btf *btf, const struct btf *base_btf, __u32 **id_map) in btf_relocate() argument
454 if (!base_btf || r.dist_base_btf == base_btf) in btf_relocate()
458 r.nr_base_types = btf__type_cnt(base_btf); in btf_relocate()
461 r.base_btf in btf_relocate()
[all...]
H A Dbtf.c99 struct btf *base_btf; member
121 /* whether base_btf should be freed in btf_free for this instance */
283 if (btf->base_btf && hdr->str_len == 0) in btf_parse_str_sec()
289 if (!btf->base_btf && start[0]) { in btf_parse_str_sec()
625 return btf->base_btf; in btf__base_btf()
634 return btf_type_by_id(btf->base_btf, type_id); in btf_type_by_id()
664 if (btf->base_btf && btf->base_btf->ptr_sz > 0) in determine_ptr_size()
665 return btf->base_btf->ptr_sz; in determine_ptr_size()
992 btf__free(btf->base_btf); in btf__free()
996 btf_new_empty(struct btf * base_btf) btf_new_empty() argument
1043 btf__new_empty_split(struct btf * base_btf) btf__new_empty_split() argument
1048 btf_new(const void * data,__u32 size,struct btf * base_btf,bool is_mmap) btf_new() argument
1110 btf__new_split(const void * data,__u32 size,struct btf * base_btf) btf__new_split() argument
1193 btf_parse_elf(const char * path,struct btf * base_btf,struct btf_ext ** btf_ext) btf_parse_elf() argument
1300 btf__parse_elf_split(const char * path,struct btf * base_btf) btf__parse_elf_split() argument
1305 btf_parse_raw(const char * path,struct btf * base_btf) btf_parse_raw() argument
1373 btf__parse_raw_split(const char * path,struct btf * base_btf) btf__parse_raw_split() argument
1378 btf_parse_raw_mmap(const char * path,struct btf * base_btf) btf_parse_raw_mmap() argument
1409 btf_parse(const char * path,struct btf * base_btf,struct btf_ext ** btf_ext) btf_parse() argument
1431 btf__parse_split(const char * path,struct btf * base_btf) btf__parse_split() argument
1626 btf_get_from_fd(int btf_fd,struct btf * base_btf) btf_get_from_fd() argument
1680 btf_load_from_kernel(__u32 id,struct btf * base_btf,int token_fd) btf_load_from_kernel() argument
1701 btf__load_from_kernel_by_id_split(__u32 id,struct btf * base_btf) btf__load_from_kernel_by_id_split() argument
5818 btf_set_base_btf(struct btf * btf,const struct btf * base_btf) btf_set_base_btf() argument
5825 btf__relocate(struct btf * btf,const struct btf * base_btf) btf__relocate() argument
[all...]
H A Dbtf.h59 * provided raw data bytes. It takes another BTF instance, **base_btf**, which
64 * @param base_btf the base BTF object
68 * If *base_btf* is NULL, `btf__new_split()` is equivalent to `btf__new()` and
77 LIBBPF_API struct btf *btf__new_split(const void *data, __u32 size, struct btf *base_btf);
100 * If *base_btf* is NULL, `btf__new_empty_split()` is equivalent to
109 LIBBPF_API struct btf *btf__new_empty_split(struct btf *base_btf);
133 LIBBPF_API struct btf *btf__parse_split(const char *path, struct btf *base_btf);
135 LIBBPF_API struct btf *btf__parse_elf_split(const char *path, struct btf *base_btf);
137 LIBBPF_API struct btf *btf__parse_raw_split(const char *path, struct btf *base_btf);
143 LIBBPF_API struct btf *btf__load_from_kernel_by_id_split(__u32 id, struct btf *base_btf);
[all...]
H A Dlibbpf_internal.h239 void btf_set_base_btf(struct btf *btf, const struct btf *base_btf);
240 int btf_relocate(struct btf *btf, const struct btf *base_btf, __u32 **id_map);
412 struct btf *btf_load_from_kernel(__u32 id, struct btf *base_btf, int token_fd);
414 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf);
/linux/tools/bpf/bpftool/
H A Dmain.c34 struct btf *base_btf; variable
512 base_btf = btf__parse(optarg, NULL); in main()
513 if (!base_btf) { in main()
544 btf__free(base_btf); in main()
H A Dbtf.c962 if (!base_btf && in do_dump()
967 btf = btf__parse_split(*argv, base ?: base_btf); in do_dump()
1043 if (!base_btf && btf_is_kernel_module(btf_id)) { in do_dump()
1046 base_btf = get_vmlinux_btf_from_sysfs(); in do_dump()
1049 btf = btf__load_from_kernel_by_id_split(btf_id, base_btf); in do_dump()
/linux/tools/bpf/resolve_btfids/
H A Dmain.c538 struct btf *base_btf = NULL; in symbols_resolve() local
544 base_btf = btf__parse(obj->base_btf_path, NULL); in symbols_resolve()
545 err = libbpf_get_error(base_btf); in symbols_resolve()
553 btf = btf__parse_split(obj->btf ?: obj->path, base_btf); in symbols_resolve()
618 btf__free(base_btf); in symbols_resolve()
/linux/include/linux/
H A Dbtf.h568 void btf_set_base_btf(struct btf *btf, const struct btf *base_btf);
569 int btf_relocate(struct btf *btf, const struct btf *base_btf, __u32 **map_ids);
614 static inline void btf_set_base_btf(struct btf *btf, const struct btf *base_btf) in btf_set_base_btf() argument
618 static inline int btf_relocate(void *log, struct btf *btf, const struct btf *base_btf, in btf_relocate() argument
/linux/kernel/bpf/
H A Dbtf.c273 struct btf *base_btf; member
532 return btf->kernel_btf && !btf->base_btf; in btf_is_vmlinux()
541 btf = btf->base_btf; in btf_nr_types()
762 btf = btf->base_btf; in btf_name_offset_valid()
781 btf = btf->base_btf; in btf_str_by_offset()
851 btf = btf->base_btf; in btf_type_by_id()
1469 if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) in __btf_verifier_log_type()
1515 if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) in btf_verifier_log_member()
1627 if (!btf->base_btf) { in btf_add_type()
1785 return btf->base_btf; in btf_base_btf()
1793 btf_set_base_btf(struct btf * btf,const struct btf * base_btf) btf_set_base_btf() argument
6302 struct btf *btf = NULL, *vmlinux_btf, *base_btf = NULL; btf_parse_module() local
[all...]