actions: introduce start session action
[lttng-tools.git] / include / lttng / domain.h
1 /*
2 * Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_DOMAIN_H
9 #define LTTNG_DOMAIN_H
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #include <lttng/constant.h>
16
17 /*
18 * Domain types: the different possible tracers.
19 */
20 enum lttng_domain_type {
21 LTTNG_DOMAIN_NONE = 0, /* No associated domain. */
22 LTTNG_DOMAIN_KERNEL = 1, /* Linux Kernel tracer. */
23 LTTNG_DOMAIN_UST = 2, /* Global Userspace tracer. */
24 LTTNG_DOMAIN_JUL = 3, /* Java Util Logging. */
25 LTTNG_DOMAIN_LOG4J = 4, /* Java Log4j Framework. */
26 LTTNG_DOMAIN_PYTHON = 5, /* Python logging Framework. */
27 };
28
29 /* Buffer type for a specific domain. */
30 enum lttng_buffer_type {
31 LTTNG_BUFFER_PER_PID, /* Only supported by UST being the default. */
32 LTTNG_BUFFER_PER_UID, /* Only supported by UST. */
33 LTTNG_BUFFER_GLOBAL, /* Only supported by the Kernel. */
34 };
35
36 /*
37 * The structures should be initialized to zero before use.
38 */
39 #define LTTNG_DOMAIN_PADDING1 12
40 #define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
41 struct lttng_domain {
42 enum lttng_domain_type type;
43 enum lttng_buffer_type buf_type;
44 char padding[LTTNG_DOMAIN_PADDING1];
45
46 union {
47 pid_t pid;
48 char exec_name[LTTNG_NAME_MAX];
49 char padding[LTTNG_DOMAIN_PADDING2];
50 } attr;
51 };
52
53 /*
54 * List the registered domain(s) of a session.
55 *
56 * Session name CAN NOT be NULL.
57 *
58 * Return the size (number of entries) of the "lttng_domain" array. Caller
59 * must free domains. On error, a negative LTTng error code is returned.
60 */
61 extern int lttng_list_domains(const char *session_name,
62 struct lttng_domain **domains);
63
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif /* LTTNG_DOMAIN_H */
This page took 0.030246 seconds and 4 git commands to generate.