From: Mathieu Desnoyers Date: Tue, 16 Mar 2021 02:56:45 +0000 (-0400) Subject: Move struct lttng_counter_ops to internal header X-Git-Tag: v2.13.0-rc1~287 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=b5863ea7216a431f9378f3f26328dc39285401d4;p=lttng-ust.git Move struct lttng_counter_ops to internal header As of LTTng-UST 2.13, this structure does not yet need to be public. Keep it internal for now. Signed-off-by: Mathieu Desnoyers Change-Id: I3346a61ff1a98dcbebbcfe4ac68eb823f5645f7b --- diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index cff4bd14..51719b5b 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -559,28 +559,6 @@ struct lttng_channel { int tstate:1; /* Transient enable state */ }; -struct lttng_counter_dimension; - -struct lttng_counter_ops { - struct lib_counter *(*counter_create)(size_t nr_dimensions, - const struct lttng_counter_dimension *dimensions, - int64_t global_sum_step, - int global_counter_fd, - int nr_counter_cpu_fds, - const int *counter_cpu_fds, - bool is_daemon); - void (*counter_destroy)(struct lib_counter *counter); - int (*counter_add)(struct lib_counter *counter, - const size_t *dimension_indexes, int64_t v); - int (*counter_read)(struct lib_counter *counter, - const size_t *dimension_indexes, int cpu, - int64_t *value, bool *overflow, bool *underflow); - int (*counter_aggregate)(struct lib_counter *counter, - const size_t *dimension_indexes, int64_t *value, - bool *overflow, bool *underflow); - int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes); -}; - #define LTTNG_UST_STACK_CTX_PADDING 32 struct lttng_stack_ctx { struct lttng_ust_event_recorder *event_recorder; diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 5f375475..8575300e 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -164,6 +164,26 @@ struct lttng_counter_dimension { uint8_t has_overflow; }; +struct lttng_counter_ops { + struct lib_counter *(*counter_create)(size_t nr_dimensions, + const struct lttng_counter_dimension *dimensions, + int64_t global_sum_step, + int global_counter_fd, + int nr_counter_cpu_fds, + const int *counter_cpu_fds, + bool is_daemon); + void (*counter_destroy)(struct lib_counter *counter); + int (*counter_add)(struct lib_counter *counter, + const size_t *dimension_indexes, int64_t v); + int (*counter_read)(struct lib_counter *counter, + const size_t *dimension_indexes, int cpu, + int64_t *value, bool *overflow, bool *underflow); + int (*counter_aggregate)(struct lib_counter *counter, + const size_t *dimension_indexes, int64_t *value, + bool *overflow, bool *underflow); + int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes); +}; + struct lttng_counter { int objd; struct lttng_event_notifier_group *event_notifier_group; /* owner */