From: Mathieu Desnoyers Date: Mon, 10 Jan 2022 19:48:59 +0000 (-0500) Subject: Trace hit counters: introduce counter private data structures X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5a56009fd3f265d40e743422bc0a02fd22508f64;p=lttng-modules.git Trace hit counters: introduce counter private data structures Signed-off-by: Mathieu Desnoyers Change-Id: Ie6adadcbab8c41237b2bfb03b1c341b4183715cc --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index a727230f..59fc015f 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -197,6 +197,39 @@ enum lttng_kernel_event_enabler_type { LTTNG_EVENT_ENABLER_TYPE_NOTIFIER, }; +enum lttng_key_token_type { + LTTNG_KEY_TOKEN_STRING = 0, + LTTNG_KEY_TOKEN_EVENT_NAME = 1, +}; + +#define LTTNG_KEY_TOKEN_STRING_LEN_MAX LTTNG_KERNEL_ABI_KEY_TOKEN_STRING_LEN_MAX +struct lttng_key_token { + enum lttng_key_token_type type; + union { + char string[LTTNG_KEY_TOKEN_STRING_LEN_MAX]; + } arg; +}; + +#define LTTNG_NR_KEY_TOKEN LTTNG_KERNEL_ABI_NR_KEY_TOKEN +struct lttng_counter_key_dimension { + size_t nr_key_tokens; + struct lttng_key_token key_tokens[LTTNG_NR_KEY_TOKEN]; +}; + +#define LTTNG_COUNTER_DIMENSION_MAX LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX +struct lttng_counter_key { + size_t nr_dimensions; + struct lttng_counter_key_dimension key_dimensions[LTTNG_COUNTER_DIMENSION_MAX]; +}; + +struct lttng_counter_dimension { + uint64_t size; + uint64_t underflow_index; + uint64_t overflow_index; + uint8_t has_underflow; + uint8_t has_overflow; +}; + struct lttng_kernel_bytecode_node { enum lttng_kernel_bytecode_type type; struct list_head node;