char padding[LTTNG_UST_ENUM_TYPE_PADDING];
};
-/* Event field description */
+/*
+ * Event field description
+ *
+ * IMPORTANT: this structure is part of the ABI between the probe and
+ * UST. Fields need to be only added at the end, never reordered, never
+ * removed.
+ */
#define LTTNG_UST_EVENT_FIELD_PADDING 28
struct lttng_event_field {
const char *name;
struct lttng_type type;
- unsigned int written; /* written into trace */
+ unsigned int nowrite; /* do not write into trace */
char padding[LTTNG_UST_EVENT_FIELD_PADDING];
};
/*
* ltt_event structure is referred to by the tracing fast path. It must be
* kept small.
+ *
+ * IMPORTANT: this structure is part of the ABI between the probe and
+ * UST. Fields need to be only added at the end, never reordered, never
+ * removed.
*/
struct ltt_event {
+ /* LTTng-UST 2.0 starts here */
unsigned int id;
struct ltt_channel *chan;
int enabled;
const struct lttng_event_desc *desc;
int (*filter)(void *filter_data, const char *filter_stack_data);
- void *filter_data;
struct lttng_ctx *ctx;
enum lttng_ust_instrumentation instrumentation;
union {
struct cds_list_head list; /* Event list */
struct cds_list_head wildcard_list; /* Event list for wildcard */
struct ust_pending_probe *pending_probe;
- struct lttng_ust_filter_bytecode *filter_bytecode;
unsigned int metadata_dumped:1;
+ /* LTTng-UST 2.1 starts here */
+ struct lttng_ust_filter_bytecode *filter_bytecode;
+ void *filter_data;
};
struct channel;
struct lttng_ust_shm_handle;
+/*
+ * IMPORTANT: this structure is part of the ABI between the probe and
+ * UST. Fields need to be only added at the end, never reordered, never
+ * removed.
+ */
struct ltt_channel_ops {
struct ltt_channel *(*channel_create)(const char *name,
void *buf_addr,
int (*flush_buffer)(struct channel *chan, struct lttng_ust_shm_handle *handle);
};
+/*
+ * IMPORTANT: this structure is part of the ABI between the probe and
+ * UST. Fields need to be only added at the end, never reordered, never
+ * removed.
+ */
struct ltt_channel {
/*
* The pointers located in this private data are NOT safe to be
unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
};
+/*
+ * IMPORTANT: this structure is part of the ABI between the probe and
+ * UST. Fields need to be only added at the end, never reordered, never
+ * removed.
+ */
struct ltt_session {
int active; /* Is trace session active ? */
int been_active; /* Has trace session been active ? */
#undef ctf_integer_nowrite
#define ctf_integer_nowrite(_type, _item, _src) \
- _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, 0)
+ _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, 1)
#undef ctf_float_nowrite
#define ctf_float_nowrite(_type, _item, _src) \
- _ctf_float(_type, _item, _src, 0)
+ _ctf_float(_type, _item, _src, 1)
#undef ctf_array_nowrite
#define ctf_array_nowrite(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, none, 0)
+ _ctf_array_encoded(_type, _item, _src, _length, none, 1)
#undef ctf_array_text_nowrite
#define ctf_array_text_nowrite(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, UTF8, 0)
+ _ctf_array_encoded(_type, _item, _src, _length, UTF8, 1)
#undef ctf_sequence_nowrite
#define ctf_sequence_nowrite(_type, _item, _src, _length_type, _src_length) \
_ctf_sequence_encoded(_type, _item, _src, \
- _length_type, _src_length, none, 0)
+ _length_type, _src_length, none, 1)
#undef ctf_sequence_text_nowrite
#define ctf_sequence_text_nowrite(_type, _item, _src, _length_type, _src_length) \
_ctf_sequence_encoded(_type, _item, _src, \
- _length_type, _src_length, UTF8, 0)
+ _length_type, _src_length, UTF8, 1)
#undef ctf_string_nowrite
#define ctf_string_nowrite(_item, _src) \
- _ctf_string(_item, _src, 0)
+ _ctf_string(_item, _src, 1)
#undef ctf_integer
#define ctf_integer(_type, _item, _src) \
- _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, 1)
+ _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, 0)
#undef ctf_integer_hex
#define ctf_integer_hex(_type, _item, _src) \
- _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 16, 1)
+ _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 16, 0)
#undef ctf_integer_network
#define ctf_integer_network(_type, _item, _src) \
- _ctf_integer_ext(_type, _item, _src, BIG_ENDIAN, 10, 1)
+ _ctf_integer_ext(_type, _item, _src, BIG_ENDIAN, 10, 0)
#undef ctf_integer_network_hex
#define ctf_integer_network_hex(_type, _item, _src) \
- _ctf_integer_ext(_type, _item, _src, BIG_ENDIAN, 16, 1)
+ _ctf_integer_ext(_type, _item, _src, BIG_ENDIAN, 16, 0)
#undef ctf_float
#define ctf_float(_type, _item, _src) \
- _ctf_float(_type, _item, _src, 1)
+ _ctf_float(_type, _item, _src, 0)
#undef ctf_array
#define ctf_array(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, none, 1)
+ _ctf_array_encoded(_type, _item, _src, _length, none, 0)
#undef ctf_array_text
#define ctf_array_text(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, UTF8, 1)
+ _ctf_array_encoded(_type, _item, _src, _length, UTF8, 0)
#undef ctf_sequence
#define ctf_sequence(_type, _item, _src, _length_type, _src_length) \
_ctf_sequence_encoded(_type, _item, _src, \
- _length_type, _src_length, none, 1)
+ _length_type, _src_length, none, 0)
#undef ctf_sequence_text
#define ctf_sequence_text(_type, _item, _src, _length_type, _src_length) \
_ctf_sequence_encoded(_type, _item, _src, \
- _length_type, _src_length, UTF8, 1)
+ _length_type, _src_length, UTF8, 0)
#undef ctf_string
#define ctf_string(_item, _src) \
- _ctf_string(_item, _src, 1)
+ _ctf_string(_item, _src, 0)
#include <lttng/ust-tracepoint-event-nowrite.h>
#undef _ctf_integer_ext
-#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _written) \
+#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
{ \
.name = #_item, \
.type = __type_integer(_type, _byte_order, _base, none),\
- .written = _written, \
+ .nowrite = _nowrite, \
},
#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _written) \
+#define _ctf_float(_type, _item, _src, _nowrite) \
{ \
.name = #_item, \
.type = __type_float(_type), \
- .written = _written, \
+ .nowrite = _nowrite, \
},
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _written) \
+#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
{ \
.name = #_item, \
.type = \
.elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \
}, \
}, \
- .written = _written, \
+ .nowrite = _nowrite, \
},
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, \
- _length_type, _src_length, _encoding, _written) \
+ _length_type, _src_length, _encoding, _nowrite) \
{ \
.name = #_item, \
.type = \
.elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \
}, \
}, \
- .written = _written, \
+ .nowrite = _nowrite, \
},
#undef _ctf_string
-#define _ctf_string(_item, _src, _written) \
+#define _ctf_string(_item, _src, _nowrite) \
{ \
.name = #_item, \
.type = \
.atype = atype_string, \
.u.basic.string.encoding = lttng_encode_UTF8, \
}, \
- .written = _written, \
+ .nowrite = _nowrite, \
},
#undef TP_FIELDS
#include <lttng/ust-tracepoint-event-write.h>
#undef _ctf_integer_ext
-#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _written) \
+#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
__event_len += sizeof(_type);
#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _written) \
+#define _ctf_float(_type, _item, _src, _nowrite) \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
__event_len += sizeof(_type);
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _written) \
+#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
__event_len += sizeof(_type) * (_length);
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _written) \
+ _src_length, _encoding, _nowrite) \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_length_type)); \
__event_len += sizeof(_length_type); \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
__dynamic_len_idx++;
#undef _ctf_string
-#define _ctf_string(_item, _src, _written) \
+#define _ctf_string(_item, _src, _nowrite) \
__event_len += __dynamic_len[__dynamic_len_idx++] = strlen(_src) + 1;
#undef TP_ARGS
#include <lttng/ust-tracepoint-event-nowrite.h>
#undef _ctf_integer_ext
-#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _written) \
+#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
if (lttng_is_signed_type(_type)) { \
int64_t __ctf_tmp_int64 = (int64_t) (_type) (_src); \
memcpy(__stack_data, &__ctf_tmp_int64, sizeof(int64_t)); \
__stack_data += sizeof(int64_t);
#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _written) \
+#define _ctf_float(_type, _item, _src, _nowrite) \
{ \
double __ctf_tmp_double = (double) (_type) (_src); \
memcpy(__stack_data, &__ctf_tmp_double, sizeof(double)); \
}
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _written) \
+#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
{ \
unsigned long __ctf_tmp_ulong = (unsigned long) (_length); \
memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _written) \
+ _src_length, _encoding, _nowrite) \
{ \
unsigned long __ctf_tmp_ulong = (unsigned long) (_src_length); \
memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \
}
#undef _ctf_string
-#define _ctf_string(_item, _src, _written) \
+#define _ctf_string(_item, _src, _nowrite) \
{ \
memcpy(__stack_data, &(_src), sizeof(void **)); \
__stack_data += sizeof(void **); \
#include <lttng/ust-tracepoint-event-write.h>
#undef _ctf_integer_ext
-#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _written) \
+#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _written) \
+#define _ctf_float(_type, _item, _src, _nowrite) \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _written) \
+#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _written) \
+ _src_length, _encoding, _nowrite) \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_length_type)); \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_string
-#define _ctf_string(_item, _src, _written)
+#define _ctf_string(_item, _src, _nowrite)
#undef TP_ARGS
#define TP_ARGS(...) __VA_ARGS__
#include <lttng/ust-tracepoint-event-write.h>
#undef _ctf_integer_ext
-#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _written) \
+#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
{ \
_type __tmp = (_src); \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\
}
#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _written) \
+#define _ctf_float(_type, _item, _src, _nowrite) \
{ \
_type __tmp = (_src); \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\
}
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _written) \
+#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \
__chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length));
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \
- _src_length, _encoding, _written) \
+ _src_length, _encoding, _nowrite) \
{ \
_length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx]; \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\
sizeof(_type) * __get_dynamic_len(dest));
#undef _ctf_string
-#define _ctf_string(_item, _src, _written) \
+#define _ctf_string(_item, _src, _nowrite) \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(*(_src))); \
__chan->ops->event_write(&__ctx, _src, __get_dynamic_len(dest));