Home
last modified time | relevance | path

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

/linux-6.15/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()
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 = base_btf; in btf_relocate()
466 base_hdr = btf_header(r.base_btf); in btf_relocate()
509 btf_set_base_btf(btf, base_btf); in btf_relocate()
H A Dbtf.c98 struct btf *base_btf; member
621 return btf->base_btf; in btf__base_btf()
660 if (btf->base_btf && btf->base_btf->ptr_sz > 0) in determine_ptr_size()
996 if (base_btf) { in btf_new_empty()
997 btf->base_btf = base_btf; in btf_new_empty()
1047 if (base_btf) { in btf_new()
1048 btf->base_btf = base_btf; in btf_new()
1733 if (btf->base_btf) { in btf__find_str()
1759 if (btf->base_btf) { in btf__add_str()
1891 if (src_btf->base_btf) in btf__add_btf()
[all …]
H A Dbtf.h77 LIBBPF_API struct btf *btf__new_split(const void *data, __u32 size, struct btf *base_btf);
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);
274 LIBBPF_API int btf__relocate(struct btf *btf, const struct btf *base_btf);
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-6.15/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.c961 if (!base_btf && in do_dump()
966 btf = btf__parse_split(*argv, base ?: base_btf); in do_dump()
1042 if (!base_btf && btf_is_kernel_module(btf_id)) { in do_dump()
1045 base_btf = get_vmlinux_btf_from_sysfs(); in do_dump()
1048 btf = btf__load_from_kernel_by_id_split(btf_id, base_btf); in do_dump()
H A Dmain.h85 extern struct btf *base_btf;
/linux-6.15/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-6.15/include/linux/
H A Dbtf.h564 void btf_set_base_btf(struct btf *btf, const struct btf *base_btf);
565 int btf_relocate(struct btf *btf, const struct btf *base_btf, __u32 **map_ids);
610 static inline void btf_set_base_btf(struct btf *btf, const struct btf *base_btf) in btf_set_base_btf() argument
614 static inline int btf_relocate(void *log, struct btf *btf, const struct btf *base_btf, in btf_relocate() argument
/linux-6.15/kernel/bpf/
H A Dbtf.c272 struct btf *base_btf; member
540 btf = btf->base_btf; in btf_nr_types()
761 btf = btf->base_btf; in btf_name_offset_valid()
780 btf = btf->base_btf; in btf_str_by_offset()
850 btf = btf->base_btf; in btf_type_by_id()
1767 return btf->base_btf; in btf_base_btf()
1777 btf->base_btf = (struct btf *)base_btf; in btf_set_base_btf()
2013 btf = btf->base_btf; in btf_resolved_type_id()
2029 btf = btf->base_btf; in btf_resolved_type_size()
6319 btf->base_btf = base_btf; in btf_parse_module()
[all …]