From 143a6f27cfb5d0548f59899ae62ef31c6dfc9773 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 27 Jan 2022 14:03:49 -0500 Subject: [PATCH] Introduce struct lttng_kernel_channel_counter and struct lttng_kernel_channel_counter_ops Signed-off-by: Mathieu Desnoyers Change-Id: Icdc8c1fb6444eca2051b60fa4a7dd564e943da68 --- include/lttng/events.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 { -- 2.34.1