Lines Matching defs:size
84 size_t types_data_cap; /* used size stored in hdr->type_len */
109 * - for split BTF it's equal to total size of base BTF's string section size.
126 /* Pointer size (in bytes) for a target architecture of this BTF */
180 * to accommodate *need_cnt* elements of size *elem_sz* bytes each
248 pr_debug("BTF header len %u larger than data size %u\n",
255 pr_debug("Invalid BTF total size: %u\n", btf->raw_size);
405 v->size = bswap_32(v->size);
669 if (t->size != 4 && t->size != 8)
678 return t->size;
692 /* Return pointer size this BTF instance assumes. The size is heuristically
694 * recording its size in bytes. If BTF type information doesn't have any such
696 * pointer size is assumed, so will be either 4 or 8, depending on
712 /* Override or set pointer size in bytes. Only values of 4 and 8 are
772 __s64 size = -1;
785 size = t->size;
788 size = btf_ptr_sz(btf);
814 if (size < 0)
816 if (nelems && size > UINT32_MAX / nelems)
819 return nelems * size;
832 return min(btf_ptr_sz(btf), (size_t)t->size);
863 /* if struct/union size isn't a multiple of its alignment,
866 if ((t->size % max_align) != 0)
1030 static struct btf *btf_new(const void *data, __u32 size, struct btf *base_btf)
1050 btf->raw_data = malloc(size);
1055 memcpy(btf->raw_data, data, size);
1056 btf->raw_size = size;
1081 struct btf *btf__new(const void *data, __u32 size)
1083 return libbpf_ptr(btf_new(data, size, NULL));
1346 /* get file size */
1420 static void *btf_get_raw_data(const struct btf *btf, __u32 *size, bool swap_endian);
1517 static void *btf_get_raw_data(const struct btf *btf, __u32 *size, bool swap_endian)
1527 *size = btf->raw_size;
1560 *size = data_sz;
1567 const void *btf__raw_data(const struct btf *btf_ro, __u32 *size)
1582 *size = data_sz;
1587 const void *btf__get_raw_data(const struct btf *btf, __u32 *size);
1925 /* remember original strings section size if we have to roll back
2000 /* and now restore original strings section size; types data size
2013 * - *sz* - power-of-2 (1, 2, 4, ..) size of the type, in bytes;
2052 t->size = byte_sz;
2053 /* set INT info, we don't allow setting legacy bit offset/size */
2062 * - *sz* - size of the type, in bytes;
2095 t->size = byte_sz;
2157 * - *nr_elems* - the size of the array;
2181 t->size = 0;
2216 t->size = bytes_sz;
2224 * - *byte_sz* - size of the struct, in bytes;
2241 * - *byte_sz* - size of the union, in bytes;
2266 * - *bit_size* - bit size of a bitfield, 0 for non-bitfield fields;
2288 /* best-effort bit field offset/size enforcement */
2353 t->size = byte_sz;
2361 * - *byte_sz* - size of the enum, in bytes.
2439 * - *byte_sz* - size of the enum, in bytes.
2537 * values; we also assume a standard 4-byte size for it
2781 * - *byte_sz* - data section size, in bytes.
2814 t->size = byte_sz;
2823 * - *byte_sz* - variable size, in bytes.
2856 v->size = byte_sz;
2945 /* At least a record size */
2947 pr_debug(".BTF.ext %s record size not found\n", ext_sec->desc);
2951 /* The record size needs to meet the minimum standard */
2955 pr_debug("%s section in .BTF.ext has invalid record size %u\n",
3094 struct btf_ext *btf_ext__new(const __u8 *data, __u32 size)
3103 btf_ext->data_size = size;
3104 btf_ext->data = malloc(size);
3109 memcpy(btf_ext->data, data, size);
3111 err = btf_ext_parse_hdr(btf_ext->data, size);
3144 const void *btf_ext__get_raw_data(const struct btf_ext *btf_ext, __u32 *size)
3146 *size = btf_ext->data_size;
3189 * BTF type descriptor, greatly reducing resulting size of BTF data.
3291 * (i.e., hashed kind, name, size, fields, etc) into a list of canonical types
3649 h = hash_combine(h, t->size);
3657 t1->size == t2->size;
3688 /* don't hash vlen, enum members and size to support enum fwd resolving */
3754 * - skip comparing size to allow enum forward declarations
4533 * into account type's name, size, number, order and names of fields, but
4880 * [1] STRUCT 'foo' size=4 vlen=1 ...
4881 * [2] INT 'int' size=4 ...