Fix: move "user" attribute from field to type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Sep 2022 19:06:58 +0000 (15:06 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Sep 2022 21:01:54 +0000 (17:01 -0400)
The "user" field attribute (copy from userspace) is not taken into
account in the bytecode specialization and interpreter recursive
traversal through composed types (LOAD_FIELD bytecode instructions).

Those are currently used by the filter expressions which access fields
nested within composed types.

Move the "user" attribute from the event fields to the integer and
string types. This will allow ensuring that the bytecode specialization
and interpreter have access to this user attribute even in nested types
(e.g. arrays, sequences) in a subsequent change.

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

instrumentation/events/lttng-module/net.h
instrumentation/syscalls/headers/syscalls_pointers_override.h
lttng-events.h
lttng-filter.c
probes/lttng-tracepoint-event-impl.h

index c66a6dba3fe9310bd6c929aac9224cc073b1b267..53f95f498dbfa6580716c4a2007a7612db03ad47 100644 (file)
@@ -36,52 +36,52 @@ static struct lttng_event_field tcpfields[] = {
        [0] = {
                .name = "source_port",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [1] = {
                .name = "dest_port",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [2] = {
                .name = "seq",
                .type = __type_integer(uint32_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [3] = {
                .name = "ack_seq",
                .type = __type_integer(uint32_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [4] = {
                .name = "data_offset",
                .type = __type_integer(uint8_t, 4, 4, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [5] = {
                .name = "reserved",
                .type = __type_integer(uint8_t, 3, 1, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [6] = {
                .name = "flags",
                .type = __type_integer(uint8_t, 9, 1, 0,
-                               __BIG_ENDIAN, 16, none),
+                               __BIG_ENDIAN, 0, 16, none),
        },
        [7] = {
                .name = "window_size",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [8] = {
                .name = "checksum",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 16, none),
+                               __BIG_ENDIAN, 0, 16, none),
        },
        [9] = {
                .name = "urg_ptr",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
 };
 
@@ -183,37 +183,37 @@ static struct lttng_event_field ipv4fields[] = {
        [0] = {
                .name = "version",
                .type = __type_integer(uint8_t, 4, 4, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [1] = {
                .name = "ihl",
                .type = __type_integer(uint8_t, 4, 4, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [2] = {
                .name = "tos",
                .type = __type_integer(uint8_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [3] = {
                .name = "tot_len",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [4] = {
                .name = "id",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 16, none),
+                               __BIG_ENDIAN, 0, 16, none),
        },
        [5] = {
                .name = "frag_off",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [6] = {
                .name = "ttl",
                .type = __type_integer(uint8_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [7] = {
                .name = "protocol",
@@ -228,6 +228,7 @@ static struct lttng_event_field ipv4fields[] = {
                                .reverse_byte_order =
                                        __BIG_ENDIAN != __BYTE_ORDER,
                                .base = 10,
+                               .user = 0,
                                .encoding = lttng_encode_none,
                        },
                },
@@ -235,7 +236,7 @@ static struct lttng_event_field ipv4fields[] = {
        [8] = {
                .name = "checksum",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 16, none),
+                               __BIG_ENDIAN, 0, 16, none),
        },
        [9] = {
                .name = "saddr",
@@ -243,7 +244,7 @@ static struct lttng_event_field ipv4fields[] = {
                        .atype = atype_array,
                        .u.array.elem_type =
                                __type_integer(uint8_t, 0, 0, 0,
-                                       __BIG_ENDIAN, 10, none),
+                                       __BIG_ENDIAN, 0, 10, none),
                        .u.array.length = 4,
                        .u.array.elem_alignment = lttng_alignof(uint8_t),
                },
@@ -254,7 +255,7 @@ static struct lttng_event_field ipv4fields[] = {
                        .atype = atype_array,
                        .u.array.elem_type =
                                __type_integer(uint8_t, 0, 0, 0,
-                                       __BIG_ENDIAN, 10, none),
+                                       __BIG_ENDIAN, 0, 10, none),
                        .u.array.length = 4,
                        .u.array.elem_alignment = lttng_alignof(uint8_t),
                },
@@ -270,6 +271,7 @@ static struct lttng_event_field ipv4fields[] = {
                                .signedness = 0,
                                .reverse_byte_order = 0,
                                .base = 10,
+                               .user = 0,
                                .encoding = lttng_encode_none,
                        },
                },
@@ -289,12 +291,12 @@ static struct lttng_event_field ipv6fields[] = {
        [0] = {
                .name = "version",
                .type = __type_integer(uint8_t, 4, 4, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [1] = {
                .name = "prio",
                .type = __type_integer(uint8_t, 4, 4, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [2] = {
                .name = "flow_lbl",
@@ -302,7 +304,7 @@ static struct lttng_event_field ipv6fields[] = {
                        .atype = atype_array,
                        .u.array.elem_type =
                                __type_integer(uint8_t, 0, 0, 0,
-                                       __BIG_ENDIAN, 16, none),
+                                       __BIG_ENDIAN, 0, 16, none),
                        .u.array.length = 3,
                        .u.array.elem_alignment = lttng_alignof(uint8_t),
                },
@@ -310,7 +312,7 @@ static struct lttng_event_field ipv6fields[] = {
        [3] = {
                .name = "payload_len",
                .type = __type_integer(uint16_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [4] = {
                .name = "nexthdr",
@@ -325,6 +327,7 @@ static struct lttng_event_field ipv6fields[] = {
                                .reverse_byte_order =
                                        __BIG_ENDIAN != __BYTE_ORDER,
                                .base = 10,
+                               .user = 0,
                                .encoding = lttng_encode_none,
                        },
                },
@@ -332,7 +335,7 @@ static struct lttng_event_field ipv6fields[] = {
        [5] = {
                .name = "hop_limit",
                .type = __type_integer(uint8_t, 0, 0, 0,
-                               __BIG_ENDIAN, 10, none),
+                               __BIG_ENDIAN, 0, 10, none),
        },
        [6] = {
                .name = "saddr",
@@ -340,7 +343,7 @@ static struct lttng_event_field ipv6fields[] = {
                        .atype = atype_array,
                        .u.array.elem_type =
                                __type_integer(uint16_t, 0, 0, 0,
-                                       __BIG_ENDIAN, 16, none),
+                                       __BIG_ENDIAN, 0, 16, none),
                        .u.array.length = 8,
                        .u.array.elem_alignment = lttng_alignof(uint16_t),
                },
@@ -351,7 +354,7 @@ static struct lttng_event_field ipv6fields[] = {
                        .atype = atype_array,
                        .u.array.elem_type =
                                __type_integer(uint16_t, 0, 0, 0,
-                                       __BIG_ENDIAN, 16, none),
+                                       __BIG_ENDIAN, 0, 16, none),
                        .u.array.length = 8,
                        .u.array.elem_alignment = lttng_alignof(uint16_t),
                },
@@ -367,6 +370,7 @@ static struct lttng_event_field ipv6fields[] = {
                                .signedness = 0,
                                .reverse_byte_order = 0,
                                .base = 10,
+                               .user = 0,
                                .encoding = lttng_encode_none,
                        },
                },
index cdc5645001a06fd98ab0b01d12a18a040d9df2b0..2dcef0bda24ffd5032b0e5758ed42dbd2aafbda0 100644 (file)
@@ -149,9 +149,9 @@ end:        ; /* Label at end of compound statement. */                                     \
                ctf_custom_type(                                                                        \
                        .atype = atype_sequence,                                                        \
                        .u.sequence.length_type = __type_integer(                                       \
-                               uint8_t, 0, 0, 0, __BYTE_ORDER, 10, none),                              \
+                               uint8_t, 0, 0, 0, __BYTE_ORDER, 0, 10, none),                           \
                        .u.sequence.elem_type = __type_integer(uint8_t, 0, 0, 0,                        \
-                               __BYTE_ORDER, 16, none),                                                \
+                               __BYTE_ORDER, 0, 16, none),                                             \
                ),                                                                                      \
                name,                                                                                   \
                ctf_custom_code(                                                                        \
@@ -186,9 +186,9 @@ end:        ; /* Label at end of compound statement. */                                     \
                ctf_custom_type(                                                                        \
                        .atype = atype_sequence,                                                        \
                        .u.sequence.length_type = __type_integer(                                       \
-                               uint8_t, 0, 0, 0, __BYTE_ORDER, 10, none),                              \
+                               uint8_t, 0, 0, 0, __BYTE_ORDER, 0, 10, none),                           \
                        .u.sequence.elem_type = __type_integer(uint8_t, 0, 0, 0,                        \
-                               __BYTE_ORDER, 16, none),                                                \
+                               __BYTE_ORDER, 0, 16, none),                                             \
                ),                                                                                      \
                name,                                                                                   \
                ctf_custom_code(                                                                        \
@@ -310,43 +310,43 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(pselect6,
 static struct lttng_event_field lttng_pollfd_flag_fields[] = {
        [ilog2(POLLIN)] = {
                .name = "POLLIN",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(POLLPRI)] = {
                .name = "POLLPRI",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(POLLOUT)] = {
                .name = "POLLOUT",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(POLLERR)] = {
                .name = "POLLERR",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(POLLHUP)] = {
                .name = "POLLHUP",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(POLLNVAL)] = {
                .name = "POLLNVAL",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(LTTNG_POLL_NRFLAGS)] = {
                .name = "padding",
                .type = __type_integer(int, POLL_FLAGS_PADDING_SIZE, 1, 0,
-                               __LITTLE_ENDIAN, 10, none),
+                               __LITTLE_ENDIAN, 0, 10, none),
        },
 };
 
 static struct lttng_event_field lttng_pollfd_fields[] = {
        [0] = {
                .name = "fd",
-               .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 10, none),
+               .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 0, 10, none),
        },
        [1] = {
                .name = "raw_events",
-               .type = __type_integer(short, 0, 0, 0, __BYTE_ORDER, 16, none),
+               .type = __type_integer(short, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
        },
        [2] = {
                .name = "events",
@@ -572,32 +572,32 @@ static struct lttng_event_field lttng_epoll_ctl_events_fields[] = {
        /* 0x0001 */
        [ilog2(POLLIN)] = {
                .name = "EPOLLIN",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        /* 0x0002 */
        [ilog2(POLLPRI)] = {
                .name = "EPOLLPRI",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        /* 0x0004 */
        [ilog2(POLLOUT)] = {
                .name = "EPOLLOUT",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        /* 0x0008 */
        [ilog2(POLLERR)] = {
                .name = "EPOLLERR",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        /* 0x0010 */
        [ilog2(POLLHUP)] = {
                .name = "EPOLLHUP",
-               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+               .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
        },
        [ilog2(LTTNG_EPOLL_NRFLAGS)] = {
                .name = "padding",
                .type = __type_integer(int, EPOLL_FLAGS_PADDING_SIZE, 1, 0,
-                               __LITTLE_ENDIAN, 10, none),
+                               __LITTLE_ENDIAN, 0, 10, none),
        },
 
 };
@@ -605,11 +605,11 @@ static struct lttng_event_field lttng_epoll_ctl_events_fields[] = {
 static struct lttng_event_field lttng_epoll_data_fields[] = {
        [0] = {
                .name = "u64",
-               .type = __type_integer(uint64_t, 0, 0, 0, __BYTE_ORDER, 16, none),
+               .type = __type_integer(uint64_t, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
        },
        [1] = {
                .name = "fd",
-               .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 10, none),
+               .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 0, 10, none),
        },
 };
 
@@ -624,7 +624,7 @@ static struct lttng_event_field epoll_ctl_fields[] = {
        },
        [1] = {
                .name = "raw_events",
-               .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 16, none),
+               .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
        },
        [2] = {
                .name = "events",
@@ -702,7 +702,7 @@ static struct lttng_event_field lttng_epoll_wait_fields[] = {
        },
        [1] = {
                .name = "raw_events",
-               .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 16, none),
+               .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
        },
        [2] = {
                .name = "events",
index e2cd544559d512b7443def6035569060a3ced300..da2637d7800e88cc70c61f1898ac88525a9327bb 100644 (file)
@@ -75,7 +75,7 @@ struct lttng_enum_entry {
 };
 
 #define __type_integer(_type, _size, _alignment, _signedness,  \
-               _byte_order, _base, _encoding)  \
+               _byte_order, _user, _base, _encoding)           \
        {                                                       \
            .atype = atype_integer,                             \
            .u.basic.integer =                                  \
@@ -83,8 +83,9 @@ struct lttng_enum_entry {
                  .size = (_size) ? : sizeof(_type) * CHAR_BIT, \
                  .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \
                  .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \
-                 .reverse_byte_order = _byte_order != __BYTE_ORDER, \
-                 .base = _base,                                \
+                 .reverse_byte_order = (_byte_order) != __BYTE_ORDER, \
+                 .base = (_base),                              \
+                 .user = (_user),                              \
                  .encoding = lttng_encode_##_encoding,         \
                },                                              \
        }                                                       \
@@ -93,7 +94,8 @@ struct lttng_integer_type {
        unsigned int size;              /* in bits */
        unsigned short alignment;       /* in bits */
        unsigned int signedness:1,
-               reverse_byte_order:1;
+               reverse_byte_order:1,
+               user:1;                 /* fetch from user-space */
        unsigned int base;              /* 2, 8, 10, 16, for pretty print */
        enum lttng_string_encodings encoding;
 };
@@ -106,6 +108,7 @@ union _lttng_basic_type {
        } enumeration;
        struct {
                enum lttng_string_encodings encoding;
+               unsigned int user:1;                    /* fetch from user-space */
        } string;
 };
 
@@ -161,8 +164,7 @@ struct lttng_enum_desc {
 struct lttng_event_field {
        const char *name;
        struct lttng_type type;
-       unsigned int nowrite:1,         /* do not write into trace */
-                       user:1;         /* fetch from user-space */
+       unsigned int nowrite:1;         /* do not write into trace */
 };
 
 union lttng_ctx_value {
index 05ce683ee72121a659cf620dcca2c3dcefb593c2..ec6fd576097af828dbe3dfa064691ca3545119b4 100644 (file)
@@ -246,7 +246,7 @@ int apply_field_reloc(struct lttng_event *event,
 
                        if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
-                       if (field->user)
+                       if (elem_type->u.basic.integer.user)
                                op->op = FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE;
                        else
                                op->op = FILTER_OP_LOAD_FIELD_REF_SEQUENCE;
@@ -258,14 +258,14 @@ int apply_field_reloc(struct lttng_event *event,
 
                        if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
-                       if (field->user)
+                       if (elem_type->u.basic.integer.user)
                                op->op = FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE;
                        else
                                op->op = FILTER_OP_LOAD_FIELD_REF_SEQUENCE;
                        break;
                }
                case atype_string:
-                       if (field->user)
+                       if (field->type.u.basic.string.user)
                                op->op = FILTER_OP_LOAD_FIELD_REF_USER_STRING;
                        else
                                op->op = FILTER_OP_LOAD_FIELD_REF_STRING;
@@ -334,7 +334,7 @@ int apply_context_reloc(struct lttng_event *event,
 
                        if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
-                       BUG_ON(ctx_field->event_field.user);
+                       BUG_ON(elem_type->u.basic.integer.user);
                        op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
                        break;
                }
@@ -344,12 +344,12 @@ int apply_context_reloc(struct lttng_event *event,
 
                        if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
-                       BUG_ON(ctx_field->event_field.user);
+                       BUG_ON(elem_type->u.basic.integer.user);
                        op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
                        break;
                }
                case atype_string:
-                       BUG_ON(ctx_field->event_field.user);
+                       BUG_ON(ctx_field->event_field.type.u.basic.string.user);
                        op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
                        break;
                case atype_struct:      /* Unsupported. */
index 4231afadcd990cbc9f6129e97a10256b843b22a7..b40fbd8107a2f0d38f437dff5fd465ce08df4b53 100644 (file)
@@ -257,9 +257,8 @@ void __event_template_proto___##_name(void);
 #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \
        {                                                       \
          .name = #_item,                                       \
-         .type = __type_integer(_type, 0, 0, -1, _byte_order, _base, none),\
+         .type = __type_integer(_type, 0, 0, -1, _byte_order, _user, _base, none),\
          .nowrite = _nowrite,                                  \
-         .user = _user,                                        \
        },
 
 #undef _ctf_array_encoded
@@ -273,13 +272,12 @@ void __event_template_proto___##_name(void);
                        {                                       \
                          .array =                              \
                                {                               \
-                                 .elem_type = __type_integer(_type, 0, 0, 0, _byte_order, _base, _encoding), \
+                                 .elem_type = __type_integer(_type, 0, 0, 0, _byte_order, _user, _base, _encoding), \
                                  .length = _length,            \
                                }                               \
                        }                                       \
                },                                              \
          .nowrite = _nowrite,                                  \
-         .user = _user,                                        \
        },
 
 #undef _ctf_array_bitfield
@@ -293,14 +291,13 @@ void __event_template_proto___##_name(void);
                        {                                       \
                          .array =                              \
                                {                               \
-                                 .elem_type = __type_integer(_type, 1, 1, 0, __LITTLE_ENDIAN, 10, none), \
+                                 .elem_type = __type_integer(_type, 1, 1, 0, __LITTLE_ENDIAN, _user, 10, none), \
                                  .length = (_length) * sizeof(_type) * CHAR_BIT, \
                                  .elem_alignment = lttng_alignof(_type), \
                                }                               \
                        }                                       \
                },                                              \
          .nowrite = _nowrite,                                  \
-         .user = _user,                                        \
        },
 
 
@@ -317,13 +314,12 @@ void __event_template_proto___##_name(void);
                        {                                       \
                          .sequence =                           \
                                {                               \
-                                 .length_type = __type_integer(_length_type, 0, 0, 0, __BYTE_ORDER, 10, none), \
-                                 .elem_type = __type_integer(_type, 0, 0, -1, _byte_order, _base, _encoding), \
+                                 .length_type = __type_integer(_length_type, 0, 0, 0, __BYTE_ORDER, 0, 10, none), \
+                                 .elem_type = __type_integer(_type, 0, 0, -1, _byte_order, _user, _base, _encoding), \
                                },                              \
                        },                                      \
                },                                              \
          .nowrite = _nowrite,                                  \
-         .user = _user,                                        \
        },
 
 #undef _ctf_sequence_bitfield
@@ -339,14 +335,13 @@ void __event_template_proto___##_name(void);
                        {                                       \
                          .sequence =                           \
                                {                               \
-                                 .length_type = __type_integer(_length_type, 0, 0, 0, __BYTE_ORDER, 10, none), \
-                                 .elem_type = __type_integer(_type, 1, 1, 0, __LITTLE_ENDIAN, 10, none), \
+                                 .length_type = __type_integer(_length_type, 0, 0, 0, __BYTE_ORDER, 0, 10, none), \
+                                 .elem_type = __type_integer(_type, 1, 1, 0, __LITTLE_ENDIAN, _user, 10, none), \
                                  .elem_alignment = lttng_alignof(_type), \
                                },                              \
                        },                                      \
                },                                              \
          .nowrite = _nowrite,                                  \
-         .user = _user,                                        \
        },
 
 #undef _ctf_string
@@ -358,11 +353,10 @@ void __event_template_proto___##_name(void);
                  .atype = atype_string,                        \
                  .u =                                          \
                        {                                       \
-                         .basic = { .string = { .encoding = lttng_encode_UTF8 } } \
+                         .basic = { .string = { .encoding = lttng_encode_UTF8, .user = (_user), } } \
                        },                                      \
                },                                              \
          .nowrite = _nowrite,                                  \
-         .user = _user,                                        \
        },
 
 #undef _ctf_enum
@@ -380,6 +374,7 @@ void __event_template_proto___##_name(void);
                                                        .alignment = lttng_alignof(_type) * CHAR_BIT, \
                                                        .signedness = lttng_is_signed_type(_type), \
                                                        .reverse_byte_order = 0, \
+                                                       .user = (_user), \
                                                        .base = 10, \
                                                        .encoding = lttng_encode_none, \
                                                },              \
@@ -388,7 +383,6 @@ void __event_template_proto___##_name(void);
                        },                                      \
                },                                              \
                .nowrite = _nowrite,                            \
-               .user = _user,                                  \
        },
 
 #undef ctf_custom_field
@@ -397,7 +391,6 @@ void __event_template_proto___##_name(void);
                .name = #_item,                                 \
                .type = { _type },                              \
                .nowrite = 0,                                   \
-               .user = 0,                                      \
        },
 
 #undef ctf_custom_type
This page took 0.038011 seconds and 4 git commands to generate.