From: Mathieu Desnoyers Date: Thu, 27 Jan 2022 19:03:49 +0000 (-0500) Subject: Introduce struct lttng_kernel_channel_counter and struct lttng_kernel_channel_counter_ops X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=143a6f27cfb5d0548f59899ae62ef31c6dfc9773;p=lttng-modules.git Introduce struct lttng_kernel_channel_counter and struct lttng_kernel_channel_counter_ops Signed-off-by: Mathieu Desnoyers Change-Id: Icdc8c1fb6444eca2051b60fa4a7dd564e943da68 --- diff --git a/include/lttng/events.h b/include/lttng/events.h index d316ff6d..f1735c71 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -448,6 +448,22 @@ struct lttng_kernel_channel_buffer { struct lttng_kernel_channel_buffer_ops *ops; }; +struct lttng_kernel_channel_counter; +struct lttng_kernel_channel_counter_ops_private; + +struct lttng_kernel_channel_counter_ops { + struct lttng_kernel_channel_counter_ops_private *priv; /* Private channel counter ops interface */ + + int (*event_counter_add)(struct lttng_kernel_event_counter *event_counter, int64_t v); +}; + +struct lttng_kernel_channel_counter { + struct lttng_kernel_channel_common parent; + struct lttng_kernel_channel_counter_private *priv; /* Private channel counter interface */ + + struct lttng_kernel_channel_counter_ops *ops; +}; + #define LTTNG_DYNAMIC_LEN_STACK_SIZE 128 struct lttng_dynamic_len_stack {