Lines Matching defs:base_btf
97 struct btf *base_btf;
275 if (btf->base_btf && hdr->str_len == 0)
281 if (!btf->base_btf && start[0]) {
458 return btf->base_btf;
467 return btf_type_by_id(btf->base_btf, type_id);
497 if (btf->base_btf && btf->base_btf->ptr_sz > 0)
498 return btf->base_btf->ptr_sz;
816 static struct btf *btf_new_empty(struct btf *base_btf)
831 if (base_btf) {
832 btf->base_btf = base_btf;
833 btf->start_id = btf__type_cnt(base_btf);
834 btf->start_str_off = base_btf->hdr->str_len;
838 btf->raw_size = sizeof(struct btf_header) + (base_btf ? 0 : 1);
852 btf->hdr->str_len = base_btf ? 0 : 1; /* empty string at offset 0 */
862 struct btf *btf__new_empty_split(struct btf *base_btf)
864 return libbpf_ptr(btf_new_empty(base_btf));
867 static struct btf *btf_new(const void *data, __u32 size, struct btf *base_btf)
881 if (base_btf) {
882 btf->base_btf = base_btf;
883 btf->start_id = btf__type_cnt(base_btf);
884 btf->start_str_off = base_btf->hdr->str_len;
922 static struct btf *btf_parse_elf(const char *path, struct btf *base_btf,
1008 btf = btf_new(btf_data->d_buf, btf_data->d_size, base_btf);
1053 struct btf *btf__parse_elf_split(const char *path, struct btf *base_btf)
1055 return libbpf_ptr(btf_parse_elf(path, base_btf, NULL));
1058 static struct btf *btf_parse_raw(const char *path, struct btf *base_btf)
1112 btf = btf_new(data, sz, base_btf);
1126 struct btf *btf__parse_raw_split(const char *path, struct btf *base_btf)
1128 return libbpf_ptr(btf_parse_raw(path, base_btf));
1131 static struct btf *btf_parse(const char *path, struct btf *base_btf, struct btf_ext **btf_ext)
1139 btf = btf_parse_raw(path, base_btf);
1145 return btf_parse_elf(path, base_btf, btf_ext);
1153 struct btf *btf__parse_split(const char *path, struct btf *base_btf)
1155 return libbpf_ptr(btf_parse(path, base_btf, NULL));
1330 return btf__str_by_offset(btf->base_btf, offset);
1342 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf)
1389 btf = btf_new(ptr, btf_info.btf_size, base_btf);
1396 struct btf *btf__load_from_kernel_by_id_split(__u32 id, struct btf *base_btf)
1405 btf = btf_get_from_fd(btf_fd, base_btf);
1471 if (!btf->base_btf && btf->hdr->str_len == 1)
1496 if (btf->base_btf) {
1497 off = btf__find_str(btf->base_btf, s);
1522 if (btf->base_btf) {
1523 off = btf__find_str(btf->base_btf, s);
1656 if (src_btf->base_btf)
3310 if (d->btf->base_btf) {
3311 err = btf__find_str(d->btf->base_btf, s);
3352 if (!d->btf->base_btf) {
3682 if (!d->btf->base_btf)