struct lttng_channel: split protocol ABI from instrumentation ABI
[lttng-ust.git] / liblttng-ust / ust-events-internal.h
index 5466f25e2216e9eefc961a14e7dd1463e2858e44..bed7a85c6cf3a7c85342f6b1e4e95fa9dfd107ce 100644 (file)
@@ -342,6 +342,32 @@ struct lttng_ust_channel_ops_private {
                            struct lttng_ust_shm_handle *handle);
 };
 
+/*
+ * IMPORTANT: this structure is part of the ABI between the consumer
+ * daemon and the UST library within traced applications. Changing it
+ * breaks the UST communication protocol.
+ *
+ * TODO: remove unused fields on next UST communication protocol
+ * breaking update.
+ */
+struct lttng_ust_abi_channel_config {
+       void *unused1;
+       int unused2;
+       void *unused3;
+       void *unused4;
+       int unused5;
+       struct cds_list_head unused6;
+       void *unused7;
+       int unused8;
+       void *unused9;
+
+       /* Channel ID */
+       unsigned int id;
+       enum lttng_ust_abi_chan_type unused10;
+       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
+       int unused11:1;
+};
+
 static inline
 struct lttng_ust_type_integer *lttng_ust_get_type_integer(struct lttng_ust_type_common *type)
 {
@@ -466,6 +492,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type)
                struct lttng_ust_type_enum *enum_type = (struct lttng_ust_type_enum *) type;
 
                lttng_ust_destroy_type(enum_type->container_type);
+               free(enum_type);
                break;
        }
        case lttng_ust_type_array:
@@ -473,6 +500,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type)
                struct lttng_ust_type_array *array_type = (struct lttng_ust_type_array *) type;
 
                lttng_ust_destroy_type(array_type->elem_type);
+               free(array_type);
                break;
        }
        case lttng_ust_type_sequence:
@@ -480,6 +508,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type)
                struct lttng_ust_type_sequence *sequence_type = (struct lttng_ust_type_sequence *) type;
 
                lttng_ust_destroy_type(sequence_type->elem_type);
+               free(sequence_type);
                break;
        }
        case lttng_ust_type_struct:
@@ -489,6 +518,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type)
 
                for (i = 0; i < struct_type->nr_fields; i++)
                        lttng_ust_destroy_type(struct_type->fields[i]->type);
+               free(struct_type);
                break;
        }
        default:
This page took 0.024121 seconds and 4 git commands to generate.