Add structure size field to struct lttng_event
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 21:00:19 +0000 (16:00 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 21:00:19 +0000 (16:00 -0500)
Made possible by ABI bump. This scheme can be used for extensibility.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I38b15636605339f3f8702983aeaffafa1ab56719

include/lttng/ust-events.h
liblttng-ust/lttng-events.c

index d75a73235b5218f93831a010c88b209eb6ae5e00..37e5575eb06f4599e005d772094d618713e5481c 100644 (file)
@@ -395,6 +395,7 @@ struct lttng_bytecode_runtime {
 struct lttng_ust_event_private;
 
 struct lttng_event {
+       uint32_t struct_size;                   /* Size of this structure. */
        struct lttng_ust_event_private *priv;   /* Private event interface */
 
        unsigned int id;
index b024c4cf327603a59c105b9aaf090dc65b48e608..d29a6c712c7c1a5baf349f24a8d853542ffc2879 100644 (file)
@@ -784,6 +784,7 @@ int lttng_event_create(const struct lttng_event_desc *desc,
                ret = -ENOMEM;
                goto cache_error;
        }
+       event->struct_size = sizeof(struct lttng_event);
        event_priv = zmalloc(sizeof(struct lttng_ust_event_private));
        if (!event_priv) {
                ret = -ENOMEM;
This page took 0.026043 seconds and 4 git commands to generate.