const char *string;
};
-#define __type_integer(_type, _byte_order, _base, _encoding) \
+#define __type_integer(_type, _size, _alignment, _signedness, \
+ _byte_order, _base, _encoding) \
{ \
.atype = atype_integer, \
.u.basic.integer = \
{ \
- .size = sizeof(_type) * CHAR_BIT, \
- .alignment = lttng_alignof(_type) * CHAR_BIT, \
- .signedness = lttng_is_signed_type(_type), \
- .reverse_byte_order = _byte_order != __BYTE_ORDER, \
+ .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, \
.encoding = lttng_encode_##_encoding, \
}, \
struct {
struct lttng_basic_type elem_type;
unsigned int length; /* num. elems. */
+ unsigned int elem_alignment; /* alignment override */
} array;
struct {
struct lttng_basic_type length_type;
struct lttng_basic_type elem_type;
+ unsigned int elem_alignment; /* alignment override */
} sequence;
} u;
};
wait_queue_head_t read_wait; /* Reader buffer-level wait queue */
struct list_head list; /* Stream list */
struct lttng_transport *transport;
+ uint64_t version; /* Current version of the metadata cache */
};
struct kref refcount; /* Metadata cache usage */
struct list_head metadata_stream; /* Metadata stream list */
uuid_le uuid; /* Trace session unique ID (copy) */
- struct mutex lock;
+ struct mutex lock; /* Produce/consume lock */
+ uint64_t version; /* Current version of the metadata */
};
void lttng_lock_sessions(void);
int lttng_session_enable(struct lttng_session *session);
int lttng_session_disable(struct lttng_session *session);
void lttng_session_destroy(struct lttng_session *session);
+int lttng_session_metadata_regenerate(struct lttng_session *session);
void metadata_cache_destroy(struct kref *kref);
struct lttng_channel *lttng_channel_create(struct lttng_session *session,
int lttng_session_list_tracker_pids(struct lttng_session *session);
+void lttng_clock_ref(void);
+void lttng_clock_unref(void);
+
#if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
int lttng_syscalls_register(struct lttng_channel *chan, void *filter);
int lttng_syscalls_unregister(struct lttng_channel *chan);