[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),
},
};
[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",
.reverse_byte_order =
__BIG_ENDIAN != __BYTE_ORDER,
.base = 10,
+ .user = 0,
.encoding = lttng_encode_none,
},
},
[8] = {
.name = "checksum",
.type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 16, none),
+ __BIG_ENDIAN, 0, 16, none),
},
[9] = {
.name = "saddr",
.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),
},
.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),
},
.signedness = 0,
.reverse_byte_order = 0,
.base = 10,
+ .user = 0,
.encoding = lttng_encode_none,
},
},
[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",
.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),
},
[3] = {
.name = "payload_len",
.type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
+ __BIG_ENDIAN, 0, 10, none),
},
[4] = {
.name = "nexthdr",
.reverse_byte_order =
__BIG_ENDIAN != __BYTE_ORDER,
.base = 10,
+ .user = 0,
.encoding = lttng_encode_none,
},
},
[5] = {
.name = "hop_limit",
.type = __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
+ __BIG_ENDIAN, 0, 10, none),
},
[6] = {
.name = "saddr",
.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),
},
.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),
},
.signedness = 0,
.reverse_byte_order = 0,
.base = 10,
+ .user = 0,
.encoding = lttng_encode_none,
},
},
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( \
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( \
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",
/* 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),
},
};
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),
},
};
},
[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",
},
[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",
};
#define __type_integer(_type, _size, _alignment, _signedness, \
- _byte_order, _base, _encoding) \
+ _byte_order, _user, _base, _encoding) \
{ \
.atype = atype_integer, \
.u.basic.integer = \
.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, \
}, \
} \
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;
};
} enumeration;
struct {
enum lttng_string_encodings encoding;
+ unsigned int user:1; /* fetch from user-space */
} string;
};
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 {
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;
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;
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;
}
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. */
#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
{ \
.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
{ \
.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, \
},
{ \
.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
{ \
.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
.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
.alignment = lttng_alignof(_type) * CHAR_BIT, \
.signedness = lttng_is_signed_type(_type), \
.reverse_byte_order = 0, \
+ .user = (_user), \
.base = 10, \
.encoding = lttng_encode_none, \
}, \
}, \
}, \
.nowrite = _nowrite, \
- .user = _user, \
},
#undef ctf_custom_field
.name = #_item, \
.type = { _type }, \
.nowrite = 0, \
- .user = 0, \
},
#undef ctf_custom_type