2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 #ifndef _LTTNG_COUNTER_H
10 #define _LTTNG_COUNTER_H
13 #include <lttng/ust-config.h>
14 #include "counter-types.h"
16 /* max_nr_elem is for each dimension. */
17 struct lib_counter
*lttng_counter_create(const struct lib_counter_config
*config
,
19 const size_t *max_nr_elem
,
20 int64_t global_sum_step
,
21 int global_counter_fd
,
22 int nr_counter_cpu_fds
,
23 const int *counter_cpu_fds
,
25 __attribute__((visibility("hidden")));
27 void lttng_counter_destroy(struct lib_counter
*counter
)
28 __attribute__((visibility("hidden")));
30 int lttng_counter_set_global_shm(struct lib_counter
*counter
, int fd
)
31 __attribute__((visibility("hidden")));
33 int lttng_counter_set_cpu_shm(struct lib_counter
*counter
, int cpu
, int fd
)
34 __attribute__((visibility("hidden")));
36 int lttng_counter_get_global_shm(struct lib_counter
*counter
, int *fd
, size_t *len
)
37 __attribute__((visibility("hidden")));
39 int lttng_counter_get_cpu_shm(struct lib_counter
*counter
, int cpu
, int *fd
, size_t *len
)
40 __attribute__((visibility("hidden")));
42 int lttng_counter_read(const struct lib_counter_config
*config
,
43 struct lib_counter
*counter
,
44 const size_t *dimension_indexes
,
45 int cpu
, int64_t *value
,
46 bool *overflow
, bool *underflow
)
47 __attribute__((visibility("hidden")));
49 int lttng_counter_aggregate(const struct lib_counter_config
*config
,
50 struct lib_counter
*counter
,
51 const size_t *dimension_indexes
,
53 bool *overflow
, bool *underflow
)
54 __attribute__((visibility("hidden")));
56 int lttng_counter_clear(const struct lib_counter_config
*config
,
57 struct lib_counter
*counter
,
58 const size_t *dimension_indexes
)
59 __attribute__((visibility("hidden")));
61 #endif /* _LTTNG_COUNTER_H */
This page took 0.04699 seconds and 4 git commands to generate.