*/
} LTTNG_PACKED;
+#define LTTNG_UST_COUNTER_DIMENSION_MAX 8
enum lttng_ust_counter_arithmetic {
LTTNG_UST_COUNTER_ARITHMETIC_MODULAR = 0,
uint8_t has_overflow;
} LTTNG_PACKED;
-#define LTTNG_UST_COUNTER_DIMENSION_MAX 8
+#define LTTNG_UST_COUNTER_CONF_PADDING1 67
struct lttng_ust_counter_conf {
uint32_t arithmetic; /* enum lttng_ust_counter_arithmetic */
uint32_t bitness; /* enum lttng_ust_counter_bitness */
uint32_t number_dimensions;
int64_t global_sum_step;
struct lttng_ust_counter_dimension dimensions[LTTNG_UST_COUNTER_DIMENSION_MAX];
+ uint8_t coalesce_hits;
+ char padding[LTTNG_UST_COUNTER_CONF_PADDING1];
} LTTNG_PACKED;
struct lttng_ust_counter_value {
const int *counter_cpu_fds,
enum ustctl_counter_bitness bitness,
enum ustctl_counter_arithmetic arithmetic,
- uint32_t alloc_flags);
+ uint32_t alloc_flags,
+ bool coalesce_hits);
int ustctl_create_counter_data(struct ustctl_daemon_counter *counter,
struct lttng_ust_object_data **counter_data);
uint32_t nr_dimensions;
int64_t global_sum_step;
struct ustctl_counter_dimension dimensions[USTCTL_COUNTER_ATTR_DIMENSION_MAX];
+ bool coalesce_hits;
};
/*
const int *counter_cpu_fds,
enum ustctl_counter_bitness bitness,
enum ustctl_counter_arithmetic arithmetic,
- uint32_t alloc_flags)
+ uint32_t alloc_flags,
+ bool coalesce_hits)
{
const char *transport_name;
struct ustctl_daemon_counter *counter;
counter->attr->arithmetic = arithmetic;
counter->attr->nr_dimensions = nr_dimensions;
counter->attr->global_sum_step = global_sum_step;
+ counter->attr->coalesce_hits = coalesce_hits;
for (i = 0; i < nr_dimensions; i++)
counter->attr->dimensions[i] = dimensions[i];
}
counter_conf.number_dimensions = counter->attr->nr_dimensions;
counter_conf.global_sum_step = counter->attr->global_sum_step;
+ counter_conf.coalesce_hits = counter->attr->coalesce_hits;
for (i = 0; i < counter->attr->nr_dimensions; i++) {
counter_conf.dimensions[i].size = counter->attr->dimensions[i].size;
counter_conf.dimensions[i].underflow_index = counter->attr->dimensions[i].underflow_index;