-struct ltt_session {
- int active; /* Is trace session active ? */
- int been_active; /* Has trace session been active ? */
- int objd; /* Object associated to session */
- struct ltt_channel *metadata; /* Metadata channel */
- struct cds_list_head chan; /* Channel list head */
- struct cds_list_head events; /* Event list head */
- struct cds_list_head wildcards; /* Wildcard list head */
- struct cds_list_head list; /* Session list */
- unsigned int free_chan_id; /* Next chan ID to allocate */
- unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
- unsigned int metadata_dumped:1;
+#define LTTNG_UST_STACK_CTX_PADDING 32
+struct lttng_stack_ctx {
+ struct lttng_event *event;
+ struct lttng_ctx *chan_ctx; /* RCU dereferenced. */
+ struct lttng_ctx *event_ctx; /* RCU dereferenced. */
+ char padding[LTTNG_UST_STACK_CTX_PADDING];
+};
+
+#define LTTNG_UST_EVENT_HT_BITS 12
+#define LTTNG_UST_EVENT_HT_SIZE (1U << LTTNG_UST_EVENT_HT_BITS)
+
+struct lttng_ust_event_ht {
+ struct cds_hlist_head table[LTTNG_UST_EVENT_HT_SIZE];
+};
+
+#define LTTNG_UST_ENUM_HT_BITS 12
+#define LTTNG_UST_ENUM_HT_SIZE (1U << LTTNG_UST_ENUM_HT_BITS)
+
+struct lttng_ust_enum_ht {
+ struct cds_hlist_head table[LTTNG_UST_ENUM_HT_SIZE];
+};
+
+/*
+ * 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 lttng_session {
+ int active; /* Is trace session active ? */
+ int been_active; /* Been active ? */
+ int objd; /* Object associated */
+ void *_deprecated1;
+ struct cds_list_head chan_head; /* Channel list head */
+ struct cds_list_head events_head; /* list of events */
+ struct cds_list_head _deprecated2;
+ struct cds_list_head node; /* Session list */
+ int _deprecated3;
+ unsigned int _deprecated4:1;
+
+ /* New UST 2.1 */
+ /* List of enablers */
+ struct cds_list_head enablers_head;
+ struct lttng_ust_event_ht events_ht; /* ht of events */
+ void *owner; /* object owner */
+ int tstate:1; /* Transient enable state */
+
+ /* New UST 2.4 */
+ int statedump_pending:1;
+
+ /* New UST 2.8 */
+ struct lttng_ust_enum_ht enums_ht; /* ht of enumerations */
+ struct cds_list_head enums_head;
+ struct lttng_ctx *ctx; /* contexts for filters. */