Replace libuuid with internal implementation
[lttng-tools.git] / src / common / consumer / consumer.h
index f514aba712a24c13e3191b1a4de910fb9a0e35f0..72c580eb2e1be87894d98a4c40e83a09ce07b8a5 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <common/hashtable/hashtable.h>
 #include <common/compat/fcntl.h>
-#include <common/compat/uuid.h>
+#include <common/uuid.h>
 #include <common/sessiond-comm/sessiond-comm.h>
 #include <common/pipe.h>
 #include <common/index/ctf-index.h>
@@ -107,6 +107,12 @@ struct consumer_metadata_cache;
 struct lttng_consumer_channel {
        /* Is the channel published in the channel hash tables? */
        bool is_published;
+       /*
+        * Was the channel deleted (logically) and waiting to be reclaimed?
+        * If this flag is set, no modification that is not cleaned-up by the
+        * RCU reclamation callback should be made
+        */
+       bool is_deleted;
        /* HT node used for consumer_data.channel_ht */
        struct lttng_ht_node_u64 node;
        /* HT node used for consumer_data.channels_by_session_id_ht */
@@ -124,7 +130,17 @@ struct lttng_consumer_channel {
         * a session with per-PID buffers.
         */
        uint64_t session_id_per_pid;
-       /* Channel trace file path name. */
+       /*
+        * In the case of local streams, this field contains the channel's
+        * output path; a path relative to the session's output path.
+        *   e.g. ust/uid/1000/64-bit
+        *
+        * In the case of remote streams, the contents of this field depends
+        * on the version of the relay daemon peer. For 2.11+ peers, the
+        * contents are the same as in the local case. However, for legacy
+        * peers, this contains a path of the form:
+        *   /hostname/session_path/ust/uid/1000/64-bit
+        */
        char pathname[PATH_MAX];
        /* Channel name. */
        char name[LTTNG_SYMBOL_NAME_LEN];
@@ -143,7 +159,7 @@ struct lttng_consumer_channel {
        /* For UST */
        uid_t ust_app_uid;      /* Application UID. */
        struct ustctl_consumer_channel *uchan;
-       unsigned char uuid[UUID_STR_LEN];
+       unsigned char uuid[LTTNG_UUID_STR_LEN];
        /*
         * Temporary stream list used to store the streams once created and waiting
         * to be sent to the session daemon by receiving the
@@ -303,7 +319,7 @@ struct lttng_consumer_stream {
        bool missed_metadata_flush;
 
        enum lttng_event_output output;
-       /* Maximum subbuffer size. */
+       /* Maximum subbuffer size (in bytes). */
        unsigned long max_sb_size;
 
        /*
@@ -844,7 +860,9 @@ enum lttcomm_return_code lttng_consumer_create_trace_chunk(
                struct lttng_directory_handle *chunk_directory_handle);
 enum lttcomm_return_code lttng_consumer_close_trace_chunk(
                const uint64_t *relayd_id, uint64_t session_id,
-               uint64_t chunk_id, time_t chunk_close_timestamp);
+               uint64_t chunk_id, time_t chunk_close_timestamp,
+               const enum lttng_trace_chunk_command_type *close_command,
+               char *path);
 enum lttcomm_return_code lttng_consumer_trace_chunk_exists(
                const uint64_t *relayd_id, uint64_t session_id,
                uint64_t chunk_id);
This page took 0.023725 seconds and 4 git commands to generate.