btf_array
static inline struct btf_array *btf_array(const struct btf_type *t)
return (struct btf_array *)(t + 1);
const struct btf_array *array;
const struct btf_array *array = NULL;
const struct btf_array *array = btf_type_array(t);
const struct btf_array *array = btf_type_array(v->t);
const struct btf_array *array = btf_type_array(t);
const struct btf_array *array = btf_type_array(t);
const struct btf_array *array;
array = btf_array(var_type);
const struct btf_array *array = btf_type_array(t);
struct btf_array *array_elem;
array_elem = (struct btf_array *)(mtype + 1);
static const struct btf_array *btf_type_array(const struct btf_type *t)
return (const struct btf_array *)(t + 1);
const struct btf_array *array;
array = btf_array(member_type);
const struct btf_array *array;
array = (const struct btf_array *)(type + 1);
const struct btf_array *arr = (const void *)(t + 1);
return btf_type_rank(btf, btf_array(t)->type, has_name);
return btf_type_sort_name(btf, btf_array(t)->type, true);
struct btf_array *arr = btf_array(t);
static bool is_str_array(const struct btf *btf, const struct btf_array *arr,
struct btf_array *arr = (struct btf_array *)(t + 1);
const struct btf_array *array;
array = (struct btf_array *)(t + 1);
struct btf_array *array;
array = btf_array(btf_type);
struct btf_array *array;
array = btf_array(btf_type);
struct btf_array *array;
array = btf_array(btf_type);
struct btf_array *a;
sz = sizeof(struct btf_type) + sizeof(struct btf_array);
a = btf_array(t);
return base_size + sizeof(struct btf_array);
struct btf_array *a;
a = btf_array(t);
const struct btf_array *info = btf_array(t);
const struct btf_array *info1, *info2;
info1 = btf_array(t1);
info2 = btf_array(t2);
return btf_array(t1)->nelems == btf_array(t2)->nelems;
struct btf_array *a1, *a2;
a1 = btf_array(t1);
a2 = btf_array(t1);
const struct btf_array *cand_arr, *canon_arr;
cand_arr = btf_array(cand_type);
canon_arr = btf_array(canon_type);
const struct btf_array *a = btf_array(t);
struct btf_array *info = btf_array(t);
const struct btf_array *array;
array = btf_array(t);
return btf__align_of(btf, btf_array(t)->type);
static inline struct btf_array *btf_array(const struct btf_type *t)
return (struct btf_array *)(t + 1);
id = btf_array(t)->type;
const struct btf_array *a = btf_array(t);
const struct btf_array *array = btf_array(t);
const struct btf_array *array = btf_array(t);
const struct btf_array *array = btf_array(t);
const struct btf_array *a = btf_array(t);
return btf_dump_order_type(d, btf_array(t)->type, false);
btf_dump_emit_type(d, btf_array(t)->type, cont_id);
2, {sizeof(struct btf_type) + offsetof(struct btf_array, type),
sizeof(struct btf_type) + offsetof(struct btf_array, index_type)}
struct btf_array *a = btf_array(t);
const struct btf_array *array;
array = btf_array(array_type);
const struct btf_array *arr_info;
arr_info = btf_array(arr_t);
if (!btf_is_array(t) || btf_array(t)->nelems) {
t = skip_mods_and_typedefs(btf, btf_array(t)->type, NULL);
if (btf_array(t)->nelems == 0)
if (find_kcfg_type(btf, btf_array(t)->type, NULL) != KCFG_CHAR)
id1 = btf_array(t1)->type;
id2 = btf_array(t2)->type;
const struct btf_array *local_array = btf_array(local_t);
const struct btf_array *targ_array = btf_array(targ_t);
local_id = btf_array(local_type)->type;
targ_id = btf_array(targ_type)->type;
const struct btf_array *a = btf_array(t);
local_id = btf_array(local_type)->type;
targ_id = btf_array(targ_type)->type;
const struct btf_array *a;
a = btf_array(targ_type);
t = skip_mods_and_typedefs(spec->btf, btf_array(t)->type, &elem_id);
const struct btf_array *arr)
t = skip_mods_and_typedefs(spec->btf, btf_array(t)->type, &elem_id);
const struct btf_array *arr = btf_array(t);
return base_size + sizeof(struct btf_array);
ASSERT_EQ(btf_array(t)->index_type, 1, "array_index_type");
ASSERT_EQ(btf_array(t)->type, 2, "array_elem_type");
ASSERT_EQ(btf_array(t)->nelems, 10, "array_nelems");
} else if (btf_is_array(t) && (t = btf__type_by_id(local_btf, btf_array(t)->type)) &&
struct btf_array *barr;
barr = btf_array(t);