Introduce extension points for trace hit counters
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Jul 2024 19:20:51 +0000 (15:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Jul 2024 20:05:27 +0000 (16:05 -0400)
commitd9a337ba12e599152c5fccedd177e943049697e1
tree195fefd05b10bea5dabc5e462c2ab2f1c17ce844
parent01a3c59661c0960ae0771de8ba18c602085ee83c
Introduce extension points for trace hit counters

Introduce two extension points for trace hit counters:

1) Future "actions" to perform other than "increment",

2) Future dimension indexing schemes (keys) other than tokens.

Change the layout of struct lttng_kernel_abi_counter_key_dimension
by adding a "key_type" field. A new struct lttng_kernel_abi_counter_key_dimension_tokens
inherits from struct lttng_kernel_abi_counter_key_dimension, and contains
the uint32_t nr_key_tokens field. The only currently supported key_type
is LTTNG_KERNEL_ABI_KEY_TYPE_TOKENS = 0.

Change the layout of struct lttng_kernel_abi_counter_event by adding an
"action" field. The only currently supported action is
LTTNG_KERNEL_ABI_COUNTER_ACTION_INCREMENT = 0.

Change the struct lttng_kernel_abi_key_token_string so it inherits from
struct lttng_kernel_abi_key_token. The "len" field of
struct lttng_kernel_abi_key_token now includes the length of the entire
child structure.

Remove struct lttng_kernel_abi_counter_key: it was previously expecting
all key dimensions to have the same size. But because each dimension can
be of a different type, each may have its own distinct size.

Change the newly introduced API between probe providers to change the
"event_counter_add" callback into a "counter_hit" callback, which takes
one less argument (no integer value), but takes additional stack_data,
probe_ctx, and event_counter_ctx arguments for future use.

Change-Id: I4de86a9fac75ce759f58b545dffa2f99c59f5688
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/abi.h
include/lttng/events-internal.h
include/lttng/events.h
include/lttng/tracepoint-event-impl.h
src/lttng-abi.c
src/lttng-counter-client-percpu-32-modular.c
src/lttng-counter-client-percpu-64-modular.c
src/lttng-events.c
src/lttng-kprobes.c
src/lttng-kretprobes.c
src/lttng-uprobes.c
This page took 0.027241 seconds and 4 git commands to generate.