Searched refs:base_btf (Results 1 – 8 of 8) sorted by relevance
| /linux/tools/lib/bpf/ |
| H A D | btf_relocate.c | 40 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 D | btf.c | 141 struct btf *base_btf; member 385 if (btf->base_btf && btf->hdr.str_len == 0) in btf_parse_str_sec() 391 if (!btf->base_btf && start[0]) { in btf_parse_str_sec() 429 struct btf *base_btf = btf->base_btf; in btf_type_size_unknown() local 431 if (base_btf) { in btf_type_size_unknown() 432 l = base_btf->layout; in btf_type_size_unknown() 433 l_cnt = base_btf->hdr.layout_len / sizeof(struct btf_layout); in btf_type_size_unknown() 785 return btf->base_btf; in btf__base_btf() 794 return btf_type_by_id(btf->base_btf, type_id); in btf_type_by_id() 824 if (btf->base_btf && btf->base_btf->ptr_sz > 0) in determine_ptr_size() [all …]
|
| H A D | btf.h | 77 LIBBPF_API struct btf *btf__new_split(const void *data, __u32 size, struct btf *base_btf); 110 LIBBPF_API struct btf *btf__new_empty_split(struct btf *base_btf); 114 struct btf *base_btf; /* optional base BTF */ member 158 LIBBPF_API struct btf *btf__parse_split(const char *path, struct btf *base_btf); 160 LIBBPF_API struct btf *btf__parse_elf_split(const char *path, struct btf *base_btf); 162 LIBBPF_API struct btf *btf__parse_raw_split(const char *path, struct btf *base_btf); 168 LIBBPF_API struct btf *btf__load_from_kernel_by_id_split(__u32 id, struct btf *base_btf); 304 LIBBPF_API int btf__relocate(struct btf *btf, const struct btf *base_btf);
|
| H A D | libbpf_internal.h | 251 void btf_set_base_btf(struct btf *btf, const struct btf *base_btf); 252 int btf_relocate(struct btf *btf, const struct btf *base_btf, __u32 **id_map); 440 struct btf *btf_load_from_kernel(__u32 id, struct btf *base_btf, int token_fd); 442 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf);
|
| /linux/tools/bpf/resolve_btfids/ |
| H A D | main.c | 144 struct btf *base_btf; member 682 struct btf *base_btf = NULL, *btf = NULL; in load_btf() local 686 base_btf = btf__parse(obj->base_btf_path, NULL); in load_btf() 687 err = libbpf_get_error(base_btf); in load_btf() 695 btf = btf__parse_split(obj->btf_path ?: obj->path, base_btf); in load_btf() 703 obj->base_btf = base_btf; in load_btf() 709 btf__free(base_btf); in load_btf() 711 obj->base_btf = NULL; in load_btf() 1580 struct btf *base_btf = obj->base_btf, *btf = obj->btf; in finalize_btf() local 1589 if (obj->base_btf && obj->distill_base) { in finalize_btf() [all …]
|
| /linux/kernel/bpf/ |
| H A D | btf.c | 276 struct btf *base_btf; member 502 return btf->start_id + (btf->base_btf ? 0 : 1); in btf_start_id() 540 return btf->kernel_btf && !btf->base_btf; in btf_is_vmlinux() 549 btf = btf->base_btf; in btf_nr_types() 609 const struct btf *base_btf = btf; in btf_named_start_id() local 611 while (!own && base_btf->base_btf) in btf_named_start_id() 612 base_btf = base_btf->base_btf; in btf_named_start_id() 614 return base_btf->named_start_id ?: (base_btf->start_id ?: 1); in btf_named_start_id() 643 const struct btf *base_btf = btf_base_btf(btf); in btf_find_by_name_kind() local 648 if (base_btf) { in btf_find_by_name_kind() [all …]
|
| /linux/include/linux/ |
| H A D | btf.h | 574 void btf_set_base_btf(struct btf *btf, const struct btf *base_btf); 575 int btf_relocate(struct btf *btf, const struct btf *base_btf, __u32 **map_ids); 621 static inline void btf_set_base_btf(struct btf *btf, const struct btf *base_btf) in btf_set_base_btf() argument 625 static inline int btf_relocate(void *log, struct btf *btf, const struct btf *base_btf, in btf_relocate() argument
|
| /linux/tools/bpf/bpftool/ |
| H A D | btf.c | 995 struct btf *vmlinux_base = base_btf; in do_dump() 1046 btf = btf__parse_split(files[0], base ?: base_btf); in do_dump() 1133 if (!base_btf && btf_is_kernel_module(btf_id)) { in do_dump() 1136 base_btf = get_vmlinux_btf_from_sysfs(); in do_dump() 1139 btf = btf__load_from_kernel_by_id_split(btf_id, base_btf); in do_dump()
|