Add time namespace context
[lttng-modules.git] / include / lttng / events.h
index c9d664f1db86de4e36cb401ad560c8fbd6e3bbd6..605a48a5d3bdd16c7023678797ddefa0ae48b77f 100644 (file)
@@ -455,6 +455,7 @@ struct lttng_metadata_stream {
        struct list_head list;          /* Stream list */
        struct lttng_transport *transport;
        uint64_t version;               /* Current version of the metadata cache */
+       bool coherent;                  /* Stream in a coherent state */
 };
 
 #define LTTNG_DYNAMIC_LEN_STACK_SIZE   128
@@ -529,6 +530,7 @@ struct lttng_metadata_cache {
        char *data;                     /* Metadata cache */
        unsigned int cache_alloc;       /* Metadata allocated size (bytes) */
        unsigned int metadata_written;  /* Number of bytes written in metadata cache */
+       int producing;                  /* Metadata being produced (incomplete) */
        struct kref refcount;           /* Metadata cache usage */
        struct list_head metadata_stream;       /* Metadata stream list */
        uuid_le uuid;                   /* Trace session unique ID (copy) */
@@ -609,7 +611,7 @@ int lttng_probes_init(void);
 void lttng_probes_exit(void);
 
 int lttng_metadata_output_channel(struct lttng_metadata_stream *stream,
-               struct channel *chan);
+               struct channel *chan, bool *coherent);
 
 int lttng_id_tracker_get_node_id(const struct lttng_id_hash_node *node);
 int lttng_id_tracker_empty_set(struct lttng_id_tracker *lf);
@@ -681,11 +683,15 @@ extern struct lttng_ctx *lttng_static_ctx;
 int lttng_context_init(void);
 void lttng_context_exit(void);
 struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx);
+ssize_t lttng_append_context_index(struct lttng_ctx **ctx_p);
+struct lttng_ctx_field *lttng_get_context_field_from_index(struct lttng_ctx *ctx,
+               size_t index);
 void lttng_context_update(struct lttng_ctx *ctx);
 int lttng_find_context(struct lttng_ctx *ctx, const char *name);
 int lttng_get_context_index(struct lttng_ctx *ctx, const char *name);
 void lttng_remove_context_field(struct lttng_ctx **ctx,
                                struct lttng_ctx_field *field);
+void lttng_remove_context_field_index(struct lttng_ctx **ctx_p, size_t index);
 void lttng_destroy_context(struct lttng_ctx *ctx);
 int lttng_add_pid_to_ctx(struct lttng_ctx **ctx);
 int lttng_add_cpu_id_to_ctx(struct lttng_ctx **ctx);
@@ -799,6 +805,17 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx)
 }
 #endif
 
+#if defined(CONFIG_TIME_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+int lttng_add_time_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_time_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
 int lttng_add_uid_to_ctx(struct lttng_ctx **ctx);
 int lttng_add_euid_to_ctx(struct lttng_ctx **ctx);
 int lttng_add_suid_to_ctx(struct lttng_ctx **ctx);
This page took 0.023257 seconds and 4 git commands to generate.