+ unsigned int live_timer;
+ /*
+ * Path where to keep the shared memory files.
+ */
+ char shm_path[PATH_MAX];
+ /*
+ * Node in ltt_sessions_ht_by_id.
+ */
+ struct lttng_ht_node_u64 node;
+ /*
+ * Timer to check periodically if a relay and/or consumer has completed
+ * the last rotation.
+ */
+ bool rotation_pending_check_timer_enabled;
+ timer_t rotation_pending_check_timer;
+ /* Timer to periodically rotate a session. */
+ bool rotation_schedule_timer_enabled;
+ timer_t rotation_schedule_timer;
+ /* Value for periodic rotations, 0 if disabled. */
+ uint64_t rotate_timer_period;
+ /* Value for size-based rotations, 0 if disabled. */
+ uint64_t rotate_size;
+ /*
+ * Keep a state if this session was rotated after the last stop command.
+ * We only allow one rotation after a stop. At destroy, we also need to
+ * know if a rotation occurred since the last stop to rename the current
+ * chunk. After a stop followed by rotate, all subsequent clear
+ * (without prior start) will succeed, but will be effect-less.
+ */
+ bool rotated_after_last_stop;
+ /*
+ * Track whether the session was cleared after last stop. All subsequent
+ * clear (without prior start) will succeed, but will be effect-less. A
+ * subsequent rotate (without prior start) will return an error.
+ */
+ bool cleared_after_last_stop;
+ /*
+ * True if the session has had an explicit non-quiet rotation.
+ */
+ bool rotated;
+ /*
+ * Condition and trigger for size-based rotations.
+ */
+ struct lttng_condition *rotate_condition;
+ struct lttng_trigger *rotate_trigger;
+ LTTNG_OPTIONAL(uint64_t) most_recent_chunk_id;
+ struct lttng_trace_chunk *current_trace_chunk;
+ struct lttng_trace_chunk *chunk_being_archived;
+ /* Current state of a rotation. */
+ enum lttng_rotation_state rotation_state;
+ bool quiet_rotation;
+ char *last_archived_chunk_name;
+ LTTNG_OPTIONAL(uint64_t) last_archived_chunk_id;
+ struct lttng_dynamic_array destroy_notifiers;
+ struct lttng_dynamic_array clear_notifiers;
+ /* Session base path override. Set non-null. */
+ char *base_path;