1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
5 * LTTng Counters Configuration
7 * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 #ifndef _LTTNG_COUNTER_CONFIG_H
11 #define _LTTNG_COUNTER_CONFIG_H
13 #include <linux/types.h>
14 #include <linux/percpu.h>
16 enum lib_counter_config_alloc
{
17 COUNTER_ALLOC_PER_CPU
= (1 << 0),
18 COUNTER_ALLOC_GLOBAL
= (1 << 1),
21 enum lib_counter_config_sync
{
26 struct lib_counter_config
{
27 u32 alloc
; /* enum lib_counter_config_alloc flags */
28 enum lib_counter_config_sync sync
;
30 COUNTER_ARITHMETIC_MODULAR
,
31 COUNTER_ARITHMETIC_SATURATE
, /* TODO */
34 COUNTER_SIZE_8_BIT
= 1,
35 COUNTER_SIZE_16_BIT
= 2,
36 COUNTER_SIZE_32_BIT
= 4,
37 COUNTER_SIZE_64_BIT
= 8,
41 #endif /* _LTTNG_COUNTER_CONFIG_H */