- type = &ctx->fields[i].event_field.type;
- switch (type->atype) {
- case atype_integer:
- field_align = type->u.integer.alignment;
- break;
- case atype_array_nestable:
- {
- const struct lttng_type *nested_type;
-
- nested_type = type->u.array_nestable.elem_type;
- switch (nested_type->atype) {
- case atype_integer:
- field_align = nested_type->u.integer.alignment;
- break;
- case atype_string:
- break;
-
- case atype_array_nestable:
- case atype_sequence_nestable:
- case atype_struct_nestable:
- case atype_variant_nestable:
- default:
- WARN_ON_ONCE(1);
- break;
- }
- field_align = max_t(size_t, field_align,
- type->u.array_nestable.alignment);
- break;
- }
- case atype_sequence_nestable:
- {
- const struct lttng_type *nested_type;
-
- nested_type = type->u.sequence_nestable.elem_type;
- switch (nested_type->atype) {
- case atype_integer:
- field_align = nested_type->u.integer.alignment;
- break;
-
- case atype_string:
- break;
-
- case atype_array_nestable:
- case atype_sequence_nestable:
- case atype_struct_nestable:
- case atype_variant_nestable:
- default:
- WARN_ON_ONCE(1);
- break;
- }
- field_align = max_t(size_t, field_align,
- type->u.sequence_nestable.alignment);
- break;
- }
- case atype_string:
- break;
-
- case atype_struct_nestable:
- case atype_variant_nestable:
- break;
-
- case atype_enum_nestable:
- default:
- WARN_ON_ONCE(1);
- break;
- }