Lines Matching defs:byte_sz
1757 int btf__add_int(struct btf *btf, const char *name, size_t byte_sz, int encoding)
1765 /* byte_sz must be power of 2 */
1766 if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 16)
1790 t->size = byte_sz;
1792 *(__u32 *)(t + 1) = (encoding << 24) | (byte_sz * 8);
1805 int btf__add_float(struct btf *btf, const char *name, size_t byte_sz)
1814 /* byte_sz must be one of the explicitly allowed values */
1815 if (byte_sz != 2 && byte_sz != 4 && byte_sz != 8 && byte_sz != 12 &&
1816 byte_sz != 16)
1833 t->size = byte_sz;
1962 * - *byte_sz* - size of the struct, in bytes;
1971 int btf__add_struct(struct btf *btf, const char *name, __u32 byte_sz)
1973 return btf_add_composite(btf, BTF_KIND_STRUCT, name, byte_sz);
1979 * - *byte_sz* - size of the union, in bytes;
1989 int btf__add_union(struct btf *btf, const char *name, __u32 byte_sz)
1991 return btf_add_composite(btf, BTF_KIND_UNION, name, byte_sz);
2064 static int btf_add_enum_common(struct btf *btf, const char *name, __u32 byte_sz,
2070 /* byte_sz must be power of 2 */
2071 if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 8)
2091 t->size = byte_sz;
2099 * - *byte_sz* - size of the enum, in bytes.
2109 int btf__add_enum(struct btf *btf, const char *name, __u32 byte_sz)
2115 return btf_add_enum_common(btf, name, byte_sz, false, BTF_KIND_ENUM);
2177 * - *byte_sz* - size of the enum, in bytes.
2188 int btf__add_enum64(struct btf *btf, const char *name, __u32 byte_sz,
2191 return btf_add_enum_common(btf, name, byte_sz, is_signed,
2519 * - *byte_sz* - data section size, in bytes.
2528 int btf__add_datasec(struct btf *btf, const char *name, __u32 byte_sz)
2552 t->size = byte_sz;
2561 * - *byte_sz* - variable size, in bytes.
2567 int btf__add_datasec_var_info(struct btf *btf, int var_type_id, __u32 offset, __u32 byte_sz)
2594 v->size = byte_sz;