Home
last modified time | relevance | path

Searched refs:base_btf (Results 1 – 6 of 6) 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()
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.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);
97 * @param base_btf base BTF object
101 * If *base_btf* is NULL, `btf__new_empty_split()` is equivalent to
110 LIBBPF_API struct btf *btf__new_empty_split(struct btf *base_btf);
114 struct btf *base_btf; /* optional base BTF */
122 * optional *base_btf* and BTF kind layout description if *add_layout*
158 LIBBPF_API struct btf *btf__parse_split(const char *path, struct btf *base_btf);
[all...]
H A Dlibbpf_internal.h251 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);
435 struct btf *btf_load_from_kernel(__u32 id, struct btf *base_btf, int token_fd);
437 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf);
/linux/tools/bpf/resolve_btfids/
H A Dmain.c128 struct btf *base_btf; member
583 struct btf *base_btf = NULL, *btf = NULL; in load_btf() local
587 base_btf = btf__parse(obj->base_btf_path, NULL); in load_btf()
588 err = libbpf_get_error(base_btf); in load_btf()
596 btf = btf__parse_split(obj->btf_path ?: obj->path, base_btf); in load_btf()
604 obj->base_btf = base_btf; in load_btf()
610 btf__free(base_btf); in load_btf()
612 obj->base_btf = NULL; in load_btf()
1309 struct btf *base_btf = obj->base_btf, *btf = obj->btf; in finalize_btf() local
1312 if (obj->base_btf && obj->distill_base) { in finalize_btf()
[all …]
/linux/kernel/bpf/
H A Dbtf.c276 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/tools/bpf/bpftool/
H A Dbtf.c1001 struct btf *vmlinux_base = base_btf; in do_dump()
1052 btf = btf__parse_split(files[0], base ?: base_btf); in do_dump()
1139 if (!base_btf && btf_is_kernel_module(btf_id)) { in build_btf_type_table()
1142 base_btf = get_vmlinux_btf_from_sysfs(); in build_btf_type_table()
1145 btf = btf__load_from_kernel_by_id_split(btf_id, base_btf); in build_btf_type_table()