Lines Matching refs:base_btf
97 struct btf *base_btf; member
264 if (btf->base_btf && hdr->str_len == 0) in btf_parse_str_sec()
270 if (!btf->base_btf && start[0]) { in btf_parse_str_sec()
430 return btf->base_btf; in btf__base_btf()
439 return btf_type_by_id(btf->base_btf, type_id); in btf_type_by_id()
456 if (btf->base_btf && btf->base_btf->ptr_sz > 0) in determine_ptr_size()
457 return btf->base_btf->ptr_sz; in determine_ptr_size()
744 static struct btf *btf_new_empty(struct btf *base_btf) in btf_new_empty() argument
759 if (base_btf) { in btf_new_empty()
760 btf->base_btf = base_btf; in btf_new_empty()
761 btf->start_id = btf__get_nr_types(base_btf) + 1; in btf_new_empty()
762 btf->start_str_off = base_btf->hdr->str_len; in btf_new_empty()
766 btf->raw_size = sizeof(struct btf_header) + (base_btf ? 0 : 1); in btf_new_empty()
780 btf->hdr->str_len = base_btf ? 0 : 1; /* empty string at offset 0 */ in btf_new_empty()
790 struct btf *btf__new_empty_split(struct btf *base_btf) in btf__new_empty_split() argument
792 return libbpf_ptr(btf_new_empty(base_btf)); in btf__new_empty_split()
795 static struct btf *btf_new(const void *data, __u32 size, struct btf *base_btf) in btf_new() argument
809 if (base_btf) { in btf_new()
810 btf->base_btf = base_btf; in btf_new()
811 btf->start_id = btf__get_nr_types(base_btf) + 1; in btf_new()
812 btf->start_str_off = base_btf->hdr->str_len; in btf_new()
850 static struct btf *btf_parse_elf(const char *path, struct btf *base_btf, in btf_parse_elf() argument
937 btf = btf_new(btf_data->d_buf, btf_data->d_size, base_btf); in btf_parse_elf()
982 struct btf *btf__parse_elf_split(const char *path, struct btf *base_btf) in btf__parse_elf_split() argument
984 return libbpf_ptr(btf_parse_elf(path, base_btf, NULL)); in btf__parse_elf_split()
987 static struct btf *btf_parse_raw(const char *path, struct btf *base_btf) in btf_parse_raw() argument
1041 btf = btf_new(data, sz, base_btf); in btf_parse_raw()
1055 struct btf *btf__parse_raw_split(const char *path, struct btf *base_btf) in btf__parse_raw_split() argument
1057 return libbpf_ptr(btf_parse_raw(path, base_btf)); in btf__parse_raw_split()
1060 static struct btf *btf_parse(const char *path, struct btf *base_btf, struct btf_ext **btf_ext) in btf_parse() argument
1068 btf = btf_parse_raw(path, base_btf); in btf_parse()
1074 return btf_parse_elf(path, base_btf, btf_ext); in btf_parse()
1082 struct btf *btf__parse_split(const char *path, struct btf *base_btf) in btf__parse_split() argument
1084 return libbpf_ptr(btf_parse(path, base_btf, NULL)); in btf__parse_split()
1319 return btf__str_by_offset(btf->base_btf, offset); in btf__str_by_offset()
1331 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf) in btf_get_from_fd() argument
1378 btf = btf_new(ptr, btf_info.btf_size, base_btf); in btf_get_from_fd()
1385 struct btf *btf__load_from_kernel_by_id_split(__u32 id, struct btf *base_btf) in btf__load_from_kernel_by_id_split() argument
1394 btf = btf_get_from_fd(btf_fd, base_btf); in btf__load_from_kernel_by_id_split()
1546 if (!btf->base_btf && btf->hdr->str_len == 1) in btf_ensure_modifiable()
1571 if (btf->base_btf) { in btf__find_str()
1572 off = btf__find_str(btf->base_btf, s); in btf__find_str()
1597 if (btf->base_btf) { in btf__add_str()
1598 off = btf__find_str(btf->base_btf, s); in btf__add_str()
3171 if (d->btf->base_btf) { in strs_dedup_remap_str_off()
3172 err = btf__find_str(d->btf->base_btf, s); in strs_dedup_remap_str_off()
3213 if (!d->btf->base_btf) { in btf_dedup_strings()
3513 if (!d->btf->base_btf) in btf_dedup_prep()