Remove array, sequence, enum, struct legacy types
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 21:20:12 +0000 (16:20 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 21:20:12 +0000 (16:20 -0500)
Those are replaced by array_nestable, sequence_nestable, enum_nestable
and struct_nestable. The ABI bump allows removing the old types.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ida75c05db82fa51408b54bb005a300a40b601f88

include/lttng/ust-events.h
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust/event-notifier-notification.c
liblttng-ust/lttng-bytecode-interpreter.c
liblttng-ust/lttng-bytecode-specialize.c
liblttng-ust/lttng-bytecode.c
liblttng-ust/lttng-context.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-probes.c

index 0e80c28285ffba4eff50f11b413768fb6e827a5a..e5f06e5bdb3bdf824e51086a81fe231454a03789 100644 (file)
@@ -57,13 +57,9 @@ struct lttng_event_notifier_group;
 /* Update the astract_types name table in lttng-types.c along with this enum */
 enum lttng_abstract_types {
        atype_integer,
-       atype_enum,     /* legacy */
-       atype_array,    /* legacy */
-       atype_sequence, /* legacy */
        atype_string,
        atype_float,
        atype_dynamic,
-       atype_struct,   /* legacy */
        atype_enum_nestable,
        atype_array_nestable,
        atype_sequence_nestable,
@@ -162,29 +158,6 @@ struct lttng_float_type {
        char padding[LTTNG_UST_FLOAT_TYPE_PADDING];
 };
 
-/* legacy */
-#define LTTNG_UST_BASIC_TYPE_PADDING   128
-union _lttng_basic_type {
-       struct lttng_integer_type integer;      /* legacy */
-       struct {
-               const struct lttng_enum_desc *desc;     /* Enumeration mapping */
-               struct lttng_integer_type container_type;
-       } enumeration;                          /* legacy */
-       struct {
-               enum lttng_string_encodings encoding;
-       } string;                               /* legacy */
-       struct lttng_float_type _float;         /* legacy */
-       char padding[LTTNG_UST_BASIC_TYPE_PADDING];
-};
-
-/* legacy */
-struct lttng_basic_type {
-       enum lttng_abstract_types atype;
-       union {
-               union _lttng_basic_type basic;
-       } u;
-};
-
 #define LTTNG_UST_TYPE_PADDING 128
 struct lttng_type {
        enum lttng_abstract_types atype;
@@ -215,22 +188,6 @@ struct lttng_type {
                        unsigned int alignment;
                } struct_nestable;
 
-               union {
-                       /* legacy provider ABI 1.0 */
-                       union _lttng_basic_type basic;  /* legacy */
-                       struct {
-                               struct lttng_basic_type elem_type;
-                               unsigned int length;            /* Num. elems. */
-                       } array;                        /* legacy */
-                       struct {
-                               struct lttng_basic_type length_type;
-                               struct lttng_basic_type elem_type;
-                       } sequence;                     /* legacy */
-                       struct {
-                               unsigned int nr_fields;
-                               struct lttng_event_field *fields;       /* Array of fields. */
-                       } _struct;                      /* legacy */
-               } legacy;
                char padding[LTTNG_UST_TYPE_PADDING];
        } u;
 };
index 9e928083f3540c465ce3d186ceda8dbe979e8a6d..2cab469eb7cf0558cfe71be942448a8549fd4267 100644 (file)
@@ -871,13 +871,7 @@ ssize_t count_one_type(const struct lttng_type *lt)
        case atype_integer:
        case atype_float:
        case atype_string:
-       case atype_enum:
-       case atype_array:
-       case atype_sequence:
                return 1;
-       case atype_struct:
-               return count_fields_recursive(lt->u.legacy._struct.nr_fields,
-                               lt->u.legacy._struct.fields) + 1;
        case atype_enum_nestable:
                return count_one_type(lt->u.enum_nestable.container_type) + 1;
        case atype_array_nestable:
@@ -955,114 +949,6 @@ ssize_t count_ctx_fields_recursive(size_t nr_fields,
        return count;
 }
 
-static
-int serialize_string_encoding(int32_t *ue,
-               enum lttng_string_encodings le)
-{
-       switch (le) {
-       case lttng_encode_none:
-               *ue = ustctl_encode_none;
-               break;
-       case lttng_encode_UTF8:
-               *ue = ustctl_encode_UTF8;
-               break;
-       case lttng_encode_ASCII:
-               *ue = ustctl_encode_ASCII;
-               break;
-       default:
-               return -EINVAL;
-       }
-       return 0;
-}
-
-static
-int serialize_integer_type(struct ustctl_integer_type *uit,
-               const struct lttng_integer_type *lit)
-{
-       int32_t encoding;
-
-       uit->size = lit->size;
-       uit->signedness = lit->signedness;
-       uit->reverse_byte_order = lit->reverse_byte_order;
-       uit->base = lit->base;
-       if (serialize_string_encoding(&encoding, lit->encoding))
-               return -EINVAL;
-       uit->encoding = encoding;
-       uit->alignment = lit->alignment;
-       return 0;
-}
-
-static
-int serialize_basic_type(struct lttng_session *session,
-               enum ustctl_abstract_types *uatype,
-               enum lttng_abstract_types atype,
-               union _ustctl_basic_type *ubt,
-               const union _lttng_basic_type *lbt)
-{
-       switch (atype) {
-       case atype_integer:
-       {
-               if (serialize_integer_type(&ubt->integer, &lbt->integer))
-                       return -EINVAL;
-               *uatype = ustctl_atype_integer;
-               break;
-       }
-       case atype_string:
-       {
-               int32_t encoding;
-
-               if (serialize_string_encoding(&encoding, lbt->string.encoding))
-                       return -EINVAL;
-               ubt->string.encoding = encoding;
-               *uatype = ustctl_atype_string;
-               break;
-       }
-       case atype_float:
-       {
-               struct ustctl_float_type *uft;
-               const struct lttng_float_type *lft;
-
-               uft = &ubt->_float;
-               lft = &lbt->_float;
-               uft->exp_dig = lft->exp_dig;
-               uft->mant_dig = lft->mant_dig;
-               uft->alignment = lft->alignment;
-               uft->reverse_byte_order = lft->reverse_byte_order;
-               *uatype = ustctl_atype_float;
-               break;
-       }
-       case atype_enum:
-       {
-               strncpy(ubt->enumeration.name, lbt->enumeration.desc->name,
-                               LTTNG_UST_SYM_NAME_LEN);
-               ubt->enumeration.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
-               if (serialize_integer_type(&ubt->enumeration.container_type,
-                               &lbt->enumeration.container_type))
-                       return -EINVAL;
-               if (session) {
-                       const struct lttng_enum *_enum;
-
-                       _enum = lttng_ust_enum_get_from_desc(session, lbt->enumeration.desc);
-                       if (!_enum)
-                               return -EINVAL;
-                       ubt->enumeration.id = _enum->id;
-               } else {
-                       ubt->enumeration.id = -1ULL;
-               }
-               *uatype = ustctl_atype_enum;
-               break;
-       }
-       case atype_array:
-       case atype_array_nestable:
-       case atype_sequence:
-       case atype_sequence_nestable:
-       case atype_enum_nestable:
-       default:
-               return -EINVAL;
-       }
-       return 0;
-}
-
 static
 int serialize_dynamic_type(struct lttng_session *session,
                struct ustctl_field *fields, size_t *iter_output,
@@ -1138,52 +1024,6 @@ int serialize_one_type(struct lttng_session *session,
        case atype_integer:
        case atype_float:
        case atype_string:
-       case atype_enum:
-       {
-               struct ustctl_field *uf = &fields[*iter_output];
-               struct ustctl_type *ut = &uf->type;
-               enum ustctl_abstract_types atype;
-
-               if (field_name) {
-                       strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
-                       uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
-               } else {
-                       uf->name[0] = '\0';
-               }
-               ret = serialize_basic_type(session, &atype, lt->atype,
-                       &ut->u.legacy.basic, &lt->u.legacy.basic);
-               if (ret)
-                       return ret;
-               ut->atype = atype;
-               (*iter_output)++;
-               break;
-       }
-       case atype_array:
-       {
-               struct ustctl_field *uf = &fields[*iter_output];
-               struct ustctl_type *ut = &uf->type;
-               struct ustctl_basic_type *ubt;
-               const struct lttng_basic_type *lbt;
-               enum ustctl_abstract_types atype;
-
-               if (field_name) {
-                       strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
-                       uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
-               } else {
-                       uf->name[0] = '\0';
-               }
-               ut->atype = ustctl_atype_array;
-               ubt = &ut->u.legacy.array.elem_type;
-               lbt = &lt->u.legacy.array.elem_type;
-               ut->u.legacy.array.length = lt->u.legacy.array.length;
-               ret = serialize_basic_type(session, &atype, lbt->atype,
-                       &ubt->u.basic, &lbt->u.basic);
-               if (ret)
-                       return -EINVAL;
-               ubt->atype = atype;
-               (*iter_output)++;
-               break;
-       }
        case atype_array_nestable:
        {
                struct ustctl_field *uf = &fields[*iter_output];
@@ -1206,38 +1046,6 @@ int serialize_one_type(struct lttng_session *session,
                        return -EINVAL;
                break;
        }
-       case atype_sequence:
-       {
-               struct ustctl_field *uf = &fields[*iter_output];
-               struct ustctl_type *ut = &uf->type;
-               struct ustctl_basic_type *ubt;
-               const struct lttng_basic_type *lbt;
-               enum ustctl_abstract_types atype;
-
-               if (field_name) {
-                       strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
-                       uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
-               } else {
-                       uf->name[0] = '\0';
-               }
-               uf->type.atype = ustctl_atype_sequence;
-               ubt = &ut->u.legacy.sequence.length_type;
-               lbt = &lt->u.legacy.sequence.length_type;
-               ret = serialize_basic_type(session, &atype, lbt->atype,
-                       &ubt->u.basic, &lbt->u.basic);
-               if (ret)
-                       return -EINVAL;
-               ubt->atype = atype;
-               ubt = &ut->u.legacy.sequence.elem_type;
-               lbt = &lt->u.legacy.sequence.elem_type;
-               ret = serialize_basic_type(session, &atype, lbt->atype,
-                       &ubt->u.basic, &lbt->u.basic);
-               if (ret)
-                       return -EINVAL;
-               ubt->atype = atype;
-               (*iter_output)++;
-               break;
-       }
        case atype_sequence_nestable:
        {
                struct ustctl_field *uf = &fields[*iter_output];
@@ -1271,27 +1079,6 @@ int serialize_one_type(struct lttng_session *session,
                        return -EINVAL;
                break;
        }
-       case atype_struct:
-       {
-               struct ustctl_field *uf = &fields[*iter_output];
-
-               if (field_name) {
-                       strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
-                       uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
-               } else {
-                       uf->name[0] = '\0';
-               }
-               uf->type.atype = ustctl_atype_struct;
-               uf->type.u.legacy._struct.nr_fields = lt->u.legacy._struct.nr_fields;
-               (*iter_output)++;
-
-               ret = serialize_fields(session, fields, iter_output,
-                               lt->u.legacy._struct.nr_fields,
-                               lt->u.legacy._struct.fields);
-               if (ret)
-                       return -EINVAL;
-               break;
-       }
        case atype_struct_nestable:
        {
                struct ustctl_field *uf = &fields[*iter_output];
index 313339f19a3303e690de4190748ffa11e87c62f5..559c7fe88e21a62d42382d3aa657a595aa680aa0 100644 (file)
@@ -174,7 +174,7 @@ void capture_sequence(struct lttng_msgpack_writer *writer,
        case atype_integer:
                integer_type = &nested_type->u.integer;
                break;
-       case atype_enum:
+       case atype_enum_nestable:
                /* Treat enumeration as an integer. */
                integer_type = &nested_type->u.enum_nestable.container_type->u.integer;
                break;
index 2dfc21fbcc76b80e18e78eb889f939dcbf5b03c0..65d06576b199ed1d512499af3bb6ccb9fd038fb2 100644 (file)
@@ -244,16 +244,11 @@ static int context_get_index(struct lttng_ctx *ctx,
                        ptr->ptr = &ptr->u.u64;
                }
                break;
-       case atype_enum:        /* Fall-through */
        case atype_enum_nestable:
        {
                const struct lttng_integer_type *itype;
 
-               if (field->type.atype == atype_enum) {
-                       itype = &field->type.u.legacy.basic.enumeration.container_type;
-               } else {
-                       itype = &field->type.u.enum_nestable.container_type->u.integer;
-               }
+               itype = &field->type.u.enum_nestable.container_type->u.integer;
                ctx_field->get_value(ctx_field, &v);
                if (itype->signedness) {
                        ptr->object_type = OBJECT_TYPE_SIGNED_ENUM;
@@ -266,19 +261,6 @@ static int context_get_index(struct lttng_ctx *ctx,
                }
                break;
        }
-       case atype_array:
-               if (field->type.u.legacy.array.elem_type.atype != atype_integer) {
-                       ERR("Array nesting only supports integer types.");
-                       return -EINVAL;
-               }
-               if (field->type.u.legacy.array.elem_type.u.basic.integer.encoding == lttng_encode_none) {
-                       ERR("Only string arrays are supported for contexts.");
-                       return -EINVAL;
-               }
-               ptr->object_type = OBJECT_TYPE_STRING;
-               ctx_field->get_value(ctx_field, &v);
-               ptr->ptr = v.u.str;
-               break;
        case atype_array_nestable:
                if (field->type.u.array_nestable.elem_type->atype != atype_integer) {
                        ERR("Array nesting only supports integer types.");
@@ -292,19 +274,6 @@ static int context_get_index(struct lttng_ctx *ctx,
                ctx_field->get_value(ctx_field, &v);
                ptr->ptr = v.u.str;
                break;
-       case atype_sequence:
-               if (field->type.u.legacy.sequence.elem_type.atype != atype_integer) {
-                       ERR("Sequence nesting only supports integer types.");
-                       return -EINVAL;
-               }
-               if (field->type.u.legacy.sequence.elem_type.u.basic.integer.encoding == lttng_encode_none) {
-                       ERR("Only string sequences are supported for contexts.");
-                       return -EINVAL;
-               }
-               ptr->object_type = OBJECT_TYPE_STRING;
-               ctx_field->get_value(ctx_field, &v);
-               ptr->ptr = v.u.str;
-               break;
        case atype_sequence_nestable:
                if (field->type.u.sequence_nestable.elem_type->atype != atype_integer) {
                        ERR("Sequence nesting only supports integer types.");
@@ -369,9 +338,6 @@ static int context_get_index(struct lttng_ctx *ctx,
                        return -EINVAL;
                }
                break;
-       case atype_struct:
-               ERR("Structure type cannot be loaded.");
-               return -EINVAL;
        default:
                ERR("Unknown type: %d", (int) field->type.atype);
                return -EINVAL;
@@ -401,8 +367,7 @@ static int dynamic_get_index(struct lttng_ctx *ctx,
                        stack_top->u.ptr.ptr = ptr;
                        stack_top->u.ptr.object_type = gid->elem.type;
                        stack_top->u.ptr.rev_bo = gid->elem.rev_bo;
-                       assert(stack_top->u.ptr.field->type.atype == atype_array ||
-                                       stack_top->u.ptr.field->type.atype == atype_array_nestable);
+                       assert(stack_top->u.ptr.field->type.atype == atype_array_nestable);
                        stack_top->u.ptr.field = NULL;
                        break;
                }
@@ -421,8 +386,7 @@ static int dynamic_get_index(struct lttng_ctx *ctx,
                        stack_top->u.ptr.ptr = ptr;
                        stack_top->u.ptr.object_type = gid->elem.type;
                        stack_top->u.ptr.rev_bo = gid->elem.rev_bo;
-                       assert(stack_top->u.ptr.field->type.atype == atype_sequence ||
-                                       stack_top->u.ptr.field->type.atype == atype_sequence_nestable);
+                       assert(stack_top->u.ptr.field->type.atype == atype_sequence_nestable);
                        stack_top->u.ptr.field = NULL;
                        break;
                }
index ee65ff3be259b59bf1da7b1c7e3359700ec981ed..f571dd60197b08b38f247f288ebd38d8e4063703 100644 (file)
@@ -259,10 +259,6 @@ static int specialize_get_index(struct bytecode_runtime *runtime,
 
                        field = stack_top->load.field;
                        switch (field->type.atype) {
-                       case atype_array:
-                               integer_type = &field->type.u.legacy.array.elem_type.u.basic.integer;
-                               num_elems = field->type.u.legacy.array.length;
-                               break;
                        case atype_array_nestable:
                                if (field->type.u.array_nestable.elem_type->atype != atype_integer) {
                                        ret = -EINVAL;
@@ -303,9 +299,6 @@ static int specialize_get_index(struct bytecode_runtime *runtime,
 
                        field = stack_top->load.field;
                        switch (field->type.atype) {
-                       case atype_sequence:
-                               integer_type = &field->type.u.legacy.sequence.elem_type.u.basic.integer;
-                               break;
                        case atype_sequence_nestable:
                                if (field->type.u.sequence_nestable.elem_type->atype != atype_integer) {
                                        ret = -EINVAL;
@@ -397,16 +390,11 @@ static int specialize_load_object(const struct lttng_event_field *field,
                        load->object_type = OBJECT_TYPE_U64;
                load->rev_bo = false;
                break;
-       case atype_enum:
        case atype_enum_nestable:
        {
                const struct lttng_integer_type *itype;
 
-               if (field->type.atype == atype_enum) {
-                       itype = &field->type.u.legacy.basic.enumeration.container_type;
-               } else {
-                       itype = &field->type.u.enum_nestable.container_type->u.integer;
-               }
+               itype = &field->type.u.enum_nestable.container_type->u.integer;
                if (itype->signedness)
                        load->object_type = OBJECT_TYPE_SIGNED_ENUM;
                else
@@ -414,22 +402,6 @@ static int specialize_load_object(const struct lttng_event_field *field,
                load->rev_bo = false;
                break;
        }
-       case atype_array:
-               if (field->type.u.legacy.array.elem_type.atype != atype_integer) {
-                       ERR("Array nesting only supports integer types.");
-                       return -EINVAL;
-               }
-               if (is_context) {
-                       load->object_type = OBJECT_TYPE_STRING;
-               } else {
-                       if (field->type.u.legacy.array.elem_type.u.basic.integer.encoding == lttng_encode_none) {
-                               load->object_type = OBJECT_TYPE_ARRAY;
-                               load->field = field;
-                       } else {
-                               load->object_type = OBJECT_TYPE_STRING_SEQUENCE;
-                       }
-               }
-               break;
        case atype_array_nestable:
                if (field->type.u.array_nestable.elem_type->atype != atype_integer) {
                        ERR("Array nesting only supports integer types.");
@@ -446,22 +418,6 @@ static int specialize_load_object(const struct lttng_event_field *field,
                        }
                }
                break;
-       case atype_sequence:
-               if (field->type.u.legacy.sequence.elem_type.atype != atype_integer) {
-                       ERR("Sequence nesting only supports integer types.");
-                       return -EINVAL;
-               }
-               if (is_context) {
-                       load->object_type = OBJECT_TYPE_STRING;
-               } else {
-                       if (field->type.u.legacy.sequence.elem_type.u.basic.integer.encoding == lttng_encode_none) {
-                               load->object_type = OBJECT_TYPE_SEQUENCE;
-                               load->field = field;
-                       } else {
-                               load->object_type = OBJECT_TYPE_STRING_SEQUENCE;
-                       }
-               }
-               break;
        case atype_sequence_nestable:
                if (field->type.u.sequence_nestable.elem_type->atype != atype_integer) {
                        ERR("Sequence nesting only supports integer types.");
@@ -488,9 +444,6 @@ static int specialize_load_object(const struct lttng_event_field *field,
        case atype_dynamic:
                load->object_type = OBJECT_TYPE_DYNAMIC;
                break;
-       case atype_struct:
-               ERR("Structure type cannot be loaded.");
-               return -EINVAL;
        default:
                ERR("Unknown type: %d", (int) field->type.atype);
                return -EINVAL;
@@ -623,13 +576,10 @@ static int specialize_payload_lookup(const struct lttng_event_desc *event_desc,
                /* compute field offset on stack */
                switch (field->type.atype) {
                case atype_integer:
-               case atype_enum:
                case atype_enum_nestable:
                        field_offset += sizeof(int64_t);
                        break;
-               case atype_array:
                case atype_array_nestable:
-               case atype_sequence:
                case atype_sequence_nestable:
                        field_offset += sizeof(unsigned long);
                        field_offset += sizeof(void *);
index c52c79bb6ee35a3893e33e5b4607baae217b7312..6cc3179d3df19aa9e468e976eb8fed629ca58d07 100644 (file)
@@ -203,13 +203,10 @@ int apply_field_reloc(const struct lttng_event_desc *event_desc,
                /* compute field offset */
                switch (fields[i].type.atype) {
                case atype_integer:
-               case atype_enum:
                case atype_enum_nestable:
                        field_offset += sizeof(int64_t);
                        break;
-               case atype_array:
                case atype_array_nestable:
-               case atype_sequence:
                case atype_sequence_nestable:
                        field_offset += sizeof(unsigned long);
                        field_offset += sizeof(void *);
@@ -242,13 +239,10 @@ int apply_field_reloc(const struct lttng_event_desc *event_desc,
                field_ref = (struct field_ref *) op->data;
                switch (field->type.atype) {
                case atype_integer:
-               case atype_enum:
                case atype_enum_nestable:
                        op->op = BYTECODE_OP_LOAD_FIELD_REF_S64;
                        break;
-               case atype_array:
                case atype_array_nestable:
-               case atype_sequence:
                case atype_sequence_nestable:
                        op->op = BYTECODE_OP_LOAD_FIELD_REF_SEQUENCE;
                        break;
@@ -318,15 +312,12 @@ int apply_context_reloc(struct bytecode_runtime *runtime,
                field_ref = (struct field_ref *) op->data;
                switch (ctx_field->event_field.type.atype) {
                case atype_integer:
-               case atype_enum:
                case atype_enum_nestable:
                        op->op = BYTECODE_OP_GET_CONTEXT_REF_S64;
                        break;
                        /* Sequence and array supported as string */
                case atype_string:
-               case atype_array:
                case atype_array_nestable:
-               case atype_sequence:
                case atype_sequence_nestable:
                        op->op = BYTECODE_OP_GET_CONTEXT_REF_STRING;
                        break;
index 34609eb057291fd9355f9e953360cc0e29bc6379..dc6e13b3c5d546f183fb5b1a80ec7549a126764f 100644 (file)
@@ -172,28 +172,6 @@ void lttng_context_update(struct lttng_ctx *ctx)
                case atype_integer:
                        field_align = type->u.integer.alignment;
                        break;
-               case atype_array:
-               {
-                       struct lttng_basic_type *btype;
-
-                       btype = &type->u.legacy.array.elem_type;
-                       switch (btype->atype) {
-                       case atype_integer:
-                               field_align = btype->u.basic.integer.alignment;
-                               break;
-                       case atype_string:
-                               break;
-
-                       case atype_array:
-                       case atype_array_nestable:
-                       case atype_sequence:
-                       case atype_sequence_nestable:
-                       default:
-                               WARN_ON_ONCE(1);
-                               break;
-                       }
-                       break;
-               }
                case atype_array_nestable:
                {
                        const struct lttng_type *nested_type;
@@ -206,9 +184,7 @@ void lttng_context_update(struct lttng_ctx *ctx)
                        case atype_string:
                                break;
 
-                       case atype_array:
                        case atype_array_nestable:
-                       case atype_sequence:
                        case atype_sequence_nestable:
                        default:
                                WARN_ON_ONCE(1);
@@ -218,47 +194,6 @@ void lttng_context_update(struct lttng_ctx *ctx)
                                        type->u.array_nestable.alignment);
                        break;
                }
-               case atype_sequence:
-               {
-                       struct lttng_basic_type *btype;
-
-                       btype = &type->u.legacy.sequence.length_type;
-                       switch (btype->atype) {
-                       case atype_integer:
-                               field_align = btype->u.basic.integer.alignment;
-                               break;
-
-                       case atype_string:
-                       case atype_array:
-                       case atype_array_nestable:
-                       case atype_sequence:
-                       case atype_sequence_nestable:
-                       default:
-                               WARN_ON_ONCE(1);
-                               break;
-                       }
-
-                       btype = &type->u.legacy.sequence.elem_type;
-                       switch (btype->atype) {
-                       case atype_integer:
-                               field_align = max_t(size_t,
-                                       field_align,
-                                       btype->u.basic.integer.alignment);
-                               break;
-
-                       case atype_string:
-                               break;
-
-                       case atype_array:
-                       case atype_array_nestable:
-                       case atype_sequence:
-                       case atype_sequence_nestable:
-                       default:
-                               WARN_ON_ONCE(1);
-                               break;
-                       }
-                       break;
-               }
                case atype_sequence_nestable:
                {
                        const struct lttng_type *nested_type;
@@ -272,9 +207,7 @@ void lttng_context_update(struct lttng_ctx *ctx)
                        case atype_string:
                                break;
 
-                       case atype_array:
                        case atype_array_nestable:
-                       case atype_sequence:
                        case atype_sequence_nestable:
                        default:
                                WARN_ON_ONCE(1);
@@ -288,7 +221,6 @@ void lttng_context_update(struct lttng_ctx *ctx)
                        break;
                case atype_dynamic:
                        break;
-               case atype_enum:
                case atype_enum_nestable:
                default:
                        WARN_ON_ONCE(1);
index 92f04a3c7b2462c0b8a777305f7f07b96e67c51d..8868afeaacb29ac1fffa178aea82fb0ea34e48d8 100644 (file)
@@ -505,19 +505,6 @@ int lttng_create_enum_check(const struct lttng_type *type,
                struct lttng_session *session)
 {
        switch (type->atype) {
-       case atype_enum:
-       {
-               const struct lttng_enum_desc *enum_desc;
-               int ret;
-
-               enum_desc = type->u.legacy.basic.enumeration.desc;
-               ret = lttng_enum_create(enum_desc, session);
-               if (ret && ret != -EEXIST) {
-                       DBG("Unable to create enum error: (%d)", ret);
-                       return ret;
-               }
-               break;
-       }
        case atype_enum_nestable:
        {
                const struct lttng_enum_desc *enum_desc;
@@ -1187,9 +1174,6 @@ void _event_enum_destroy(struct lttng_session *session,
 
                field = &(event->priv->desc->fields[i]);
                switch (field->type.atype) {
-               case atype_enum:
-                       enum_desc = field->type.u.legacy.basic.enumeration.desc;
-                       break;
                case atype_enum_nestable:
                        enum_desc = field->type.u.enum_nestable.desc;
                        break;
index 2306e1e63f48b30c30065c865fa1fc7e2a24db19..d518a41d2b66cc5e439c687f8b83fd6350c807d4 100644 (file)
@@ -361,13 +361,6 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list)
                                case atype_string:
                                        list_entry->field.type = LTTNG_UST_FIELD_STRING;
                                        break;
-                               case atype_array:
-                                       if (event_field->type.u.legacy.array.elem_type.atype != atype_integer
-                                               || event_field->type.u.legacy.array.elem_type.u.basic.integer.encoding == lttng_encode_none)
-                                               list_entry->field.type = LTTNG_UST_FIELD_OTHER;
-                                       else
-                                               list_entry->field.type = LTTNG_UST_FIELD_STRING;
-                                       break;
                                case atype_array_nestable:
                                        if (event_field->type.u.array_nestable.elem_type->atype != atype_integer
                                                || event_field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_encode_none)
@@ -375,13 +368,6 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list)
                                        else
                                                list_entry->field.type = LTTNG_UST_FIELD_STRING;
                                        break;
-                               case atype_sequence:
-                                       if (event_field->type.u.legacy.sequence.elem_type.atype != atype_integer
-                                               || event_field->type.u.legacy.sequence.elem_type.u.basic.integer.encoding == lttng_encode_none)
-                                               list_entry->field.type = LTTNG_UST_FIELD_OTHER;
-                                       else
-                                               list_entry->field.type = LTTNG_UST_FIELD_STRING;
-                                       break;
                                case atype_sequence_nestable:
                                        if (event_field->type.u.sequence_nestable.elem_type->atype != atype_integer
                                                || event_field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_encode_none)
@@ -392,7 +378,6 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list)
                                case atype_float:
                                        list_entry->field.type = LTTNG_UST_FIELD_FLOAT;
                                        break;
-                               case atype_enum:        /* Fall-through */
                                case atype_enum_nestable:
                                        list_entry->field.type = LTTNG_UST_FIELD_ENUM;
                                        break;
This page took 0.037116 seconds and 4 git commands to generate.