/* UST session */
struct ltt_ust_session {
- uint64_t id; /* Unique identifier of session */
- struct ltt_ust_domain_global domain_global;
+ ltt_ust_session() = default;
+ ~ltt_ust_session() = default;
+
+ uint64_t id{}; /* Unique identifier of session */
+ struct ltt_ust_domain_global domain_global {};
/* Hash table of agent indexed by agent domain. */
- struct lttng_ht *agents;
+ struct lttng_ht *agents{};
/* UID/GID of the user owning the session */
- uid_t uid;
- gid_t gid;
+ uid_t uid{};
+ gid_t gid{};
/* Is the session active meaning has is been started or stopped. */
- unsigned int active:1;
- struct consumer_output *consumer;
+ bool active{false};
+ struct consumer_output *consumer{};
/* Sequence number for filters so the tracer knows the ordering. */
- uint64_t filter_seq_num;
+ uint64_t filter_seq_num{};
/* This indicates which type of buffer this session is set for. */
- enum lttng_buffer_type buffer_type;
+ enum lttng_buffer_type buffer_type {};
/* If set to 1, the buffer_type can not be changed anymore. */
- int buffer_type_changed;
+ int buffer_type_changed{};
/* For per UID buffer, every buffer reg object is kept of this session */
- struct cds_list_head buffer_reg_uid_list;
+ struct cds_list_head buffer_reg_uid_list {};
/* Next channel ID available for a newly registered channel. */
- uint64_t next_channel_id;
+ uint64_t next_channel_id{};
/* Once this value reaches UINT32_MAX, no more id can be allocated. */
- uint64_t used_channel_id;
+ uint64_t used_channel_id{};
/* Tell or not if the session has to output the traces. */
- unsigned int output_traces;
- unsigned int snapshot_mode;
- unsigned int has_non_default_channel;
- unsigned int live_timer_interval; /* usec */
+ unsigned int output_traces{};
+ unsigned int snapshot_mode{};
+ unsigned int has_non_default_channel{};
+ unsigned int live_timer_interval{}; /* usec */
/* Metadata channel attributes. */
- struct lttng_ust_abi_channel_attr metadata_attr;
+ struct lttng_ust_abi_channel_attr metadata_attr {};
/*
* Path where to keep the shared memory files.
*/
- char root_shm_path[PATH_MAX];
- char shm_path[PATH_MAX];
+ char root_shm_path[PATH_MAX]{};
+ char shm_path[PATH_MAX]{};
/* Current trace chunk of the ltt_session. */
- struct lttng_trace_chunk *current_trace_chunk;
+ struct lttng_trace_chunk *current_trace_chunk{};
/* Trackers used for actual lookup on app registration. */
- struct ust_id_tracker vpid_tracker;
- struct ust_id_tracker vuid_tracker;
- struct ust_id_tracker vgid_tracker;
+ struct ust_id_tracker vpid_tracker {};
+ struct ust_id_tracker vuid_tracker {};
+ struct ust_id_tracker vgid_tracker {};
/* Tracker list of keys requested by users. */
- struct process_attr_tracker *tracker_vpid;
- struct process_attr_tracker *tracker_vuid;
- struct process_attr_tracker *tracker_vgid;
+ struct process_attr_tracker *tracker_vpid{};
+ struct process_attr_tracker *tracker_vuid{};
+ struct process_attr_tracker *tracker_vgid{};
};
/*