File: config.h

package info (click to toggle)
lttng-modules 2.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,808 kB
  • sloc: ansic: 74,951; sh: 548; makefile: 62
file content (41 lines) | stat: -rw-r--r-- 898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
 *
 * counter/config.h
 *
 * LTTng Counters Configuration
 *
 * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 */

#ifndef _LTTNG_COUNTER_CONFIG_H
#define _LTTNG_COUNTER_CONFIG_H

#include <linux/types.h>
#include <linux/percpu.h>

enum lib_counter_config_alloc {
	COUNTER_ALLOC_PER_CPU		= (1 << 0),
	COUNTER_ALLOC_PER_CHANNEL	= (1 << 1),
};

enum lib_counter_config_sync {
	COUNTER_SYNC_PER_CPU,
	COUNTER_SYNC_PER_CHANNEL,
};

struct lib_counter_config {
	u32 alloc;	/* enum lib_counter_config_alloc flags */
	enum lib_counter_config_sync sync;
	enum {
		COUNTER_ARITHMETIC_MODULAR,
		COUNTER_ARITHMETIC_SATURATE,	/* TODO */
	} arithmetic;
	enum {
		COUNTER_SIZE_8_BIT	= 1,
		COUNTER_SIZE_16_BIT	= 2,
		COUNTER_SIZE_32_BIT	= 4,
		COUNTER_SIZE_64_BIT	= 8,
	} counter_size;
};

#endif /* _LTTNG_COUNTER_CONFIG_H */