CUSTOM: liver timer: immediate liver timer control on data pending and destroy
[lttng-tools.git] / src / common / sessiond-comm / sessiond-comm.h
index 29740c1d0061af15cac53b672df22375baaa3e90..ceb56f6717eb0f2e36b18274424178ca3916d87c 100644 (file)
@@ -37,6 +37,7 @@
 #include <arpa/inet.h>
 #include <netinet/in.h>
 #include <sys/un.h>
+#include <stdbool.h>
 
 #include "inet.h"
 #include "inet6.h"
@@ -56,7 +57,7 @@
 enum lttcomm_sessiond_command {
        /* Tracer command */
        LTTNG_ADD_CONTEXT                   = 0,
-       LTTNG_CALIBRATE                     = 1,
+       /* LTTNG_CALIBRATE used to be here */
        LTTNG_DISABLE_CHANNEL               = 2,
        LTTNG_DISABLE_EVENT                 = 3,
        LTTNG_LIST_SYSCALLS                 = 4,
@@ -90,11 +91,12 @@ enum lttcomm_sessiond_command {
        LTTNG_CREATE_SESSION_SNAPSHOT       = 29,
        LTTNG_CREATE_SESSION_LIVE           = 30,
        LTTNG_SAVE_SESSION                  = 31,
-       LTTNG_TRACK_PID                     = 32,
-       LTTNG_UNTRACK_PID                   = 33,
-       LTTNG_LIST_TRACKER_PIDS             = 34,
+       LTTNG_TRACK_ID                      = 32,
+       LTTNG_UNTRACK_ID                    = 33,
+       LTTNG_LIST_TRACKER_IDS              = 34,
        LTTNG_SET_SESSION_SHM_PATH          = 40,
        LTTNG_REGENERATE_METADATA           = 41,
+       LTTNG_REGENERATE_STATEDUMP          = 42,
 };
 
 enum lttcomm_relayd_command {
@@ -308,8 +310,21 @@ struct lttcomm_session_msg {
                        char shm_path[PATH_MAX];
                } LTTNG_PACKED set_shm_path;
                struct {
-                       uint32_t pid;
-               } LTTNG_PACKED pid_tracker;
+                       uint32_t tracker_type;  /* enum lttng_tracker_type */
+                       uint32_t id_type;       /* enum lttng_tracker_id_type */
+                       union {
+                               int32_t value;
+                               uint32_t var_len;
+                       } u;
+                       /*
+                        * for LTTNG_ID_STRING, followed by a variable length
+                        * zero-terminated string of length "var_len", which
+                        * includes the final \0.
+                        */
+               } LTTNG_PACKED id_tracker;
+               struct {
+                       uint32_t tracker_type;  /* enum lttng_tracker_type */
+               } LTTNG_PACKED id_tracker_list;
        } u;
 } LTTNG_PACKED;
 
@@ -380,6 +395,21 @@ struct lttcomm_channel_extended {
        uint64_t lost_packets;
 } LTTNG_PACKED;
 
+/*
+ * tracker command header.
+ */
+struct lttcomm_tracker_command_header {
+       uint32_t nb_tracker_id;
+} LTTNG_PACKED;
+
+struct lttcomm_tracker_id_header {
+       uint32_t type;   /* enum lttng_tracker_id_type */
+       union {
+               int32_t value;
+               uint32_t var_data_len;
+       } u;
+} LTTNG_PACKED;
+
 /*
  * Data structure for the response from sessiond to the lttng client.
  */
@@ -422,6 +452,8 @@ struct lttcomm_consumer_msg {
                        uint32_t monitor;
                        /* timer to check the streams usage in live mode (usec). */
                        unsigned int live_timer_interval;
+                       /* is part of a live session */
+                       uint8_t is_live;
                } LTTNG_PACKED channel; /* Only used by Kernel. */
                struct {
                        uint64_t stream_key;
@@ -453,6 +485,7 @@ struct lttcomm_consumer_msg {
                        uint32_t switch_timer_interval;         /* usec */
                        uint32_t read_timer_interval;           /* usec */
                        unsigned int live_timer_interval;               /* usec */
+                       uint8_t is_live;                        /* is part of a live session */
                        int32_t output;                         /* splice, mmap */
                        int32_t type;                           /* metadata or per_cpu */
                        uint64_t session_id;                    /* Tracing session id */
@@ -500,6 +533,12 @@ struct lttcomm_consumer_msg {
                struct {
                        uint64_t key;   /* Channel key. */
                } LTTNG_PACKED flush_channel;
+               struct {
+                       uint64_t key;   /* Channel key. */
+               } LTTNG_PACKED stop_live_timer;
+               struct {
+                       uint64_t key;   /* Channel key. */
+               } LTTNG_PACKED start_live_timer;
                struct {
                        uint64_t key;   /* Channel key. */
                } LTTNG_PACKED clear_quiescent_channel;
This page took 0.027763 seconds and 5 git commands to generate.