+ /*
+ * Indicates whether or not the user has specified an output directory
+ * or if it was configured using the default configuration.
+ */
+ bool has_user_specified_directory;
+ /* Did at least ONE start command has been triggered?. */
+ unsigned int has_been_started:1;
+ /*
+ * Is the session active? Start trace command sets this to 1 and the stop
+ * command reset it to 0.
+ */
+ unsigned int active:1;
+
+ /* Snapshot representation in a session. */
+ struct snapshot snapshot;
+ /* Indicate if the session has to output the traces or not. */
+ unsigned int output_traces;
+ /*
+ * This session is in snapshot mode. This means that channels enabled
+ * will be set in overwrite mode by default and must be in mmap
+ * output mode. Note that snapshots can be taken on a session that
+ * is not in "snapshot_mode". This parameter only affects channel
+ * creation defaults.
+ */
+ unsigned int snapshot_mode;
+ /*
+ * A session that has channels that don't use 'mmap' output can't be
+ * used to capture snapshots. This is set to true whenever a
+ * 'splice' kernel channel is enabled.
+ */
+ bool has_non_mmap_channel;
+ /*
+ * Timer set when the session is created for live reading.
+ */
+ 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.
+ */
+ bool rotated_after_last_stop;
+ /*
+ * 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;
+ /* Session base path override. Set non-null. */
+ char *base_path;