Lines Matching refs:byte_sz
2131 int btf__add_int(struct btf *btf, const char *name, size_t byte_sz, int encoding)
2139 /* byte_sz must be power of 2 */
2140 if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 16)
2164 t->size = byte_sz;
2166 *(__u32 *)(t + 1) = (encoding << 24) | (byte_sz * 8);
2179 int btf__add_float(struct btf *btf, const char *name, size_t byte_sz)
2188 /* byte_sz must be one of the explicitly allowed values */
2189 if (byte_sz != 2 && byte_sz != 4 && byte_sz != 8 && byte_sz != 12 &&
2190 byte_sz != 16)
2207 t->size = byte_sz;
2336 * - *byte_sz* - size of the struct, in bytes;
2345 int btf__add_struct(struct btf *btf, const char *name, __u32 byte_sz)
2347 return btf_add_composite(btf, BTF_KIND_STRUCT, name, byte_sz);
2353 * - *byte_sz* - size of the union, in bytes;
2363 int btf__add_union(struct btf *btf, const char *name, __u32 byte_sz)
2365 return btf_add_composite(btf, BTF_KIND_UNION, name, byte_sz);
2438 static int btf_add_enum_common(struct btf *btf, const char *name, __u32 byte_sz,
2444 /* byte_sz must be power of 2 */
2445 if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 8)
2465 t->size = byte_sz;
2473 * - *byte_sz* - size of the enum, in bytes.
2483 int btf__add_enum(struct btf *btf, const char *name, __u32 byte_sz)
2489 return btf_add_enum_common(btf, name, byte_sz, false, BTF_KIND_ENUM);
2551 * - *byte_sz* - size of the enum, in bytes.
2562 int btf__add_enum64(struct btf *btf, const char *name, __u32 byte_sz,
2565 return btf_add_enum_common(btf, name, byte_sz, is_signed,
2910 * - *byte_sz* - data section size, in bytes.
2919 int btf__add_datasec(struct btf *btf, const char *name, __u32 byte_sz)
2943 t->size = byte_sz;
2952 * - *byte_sz* - variable size, in bytes.
2958 int btf__add_datasec_var_info(struct btf *btf, int var_type_id, __u32 offset, __u32 byte_sz)
2985 v->size = byte_sz;