2 * Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
16 @addtogroup api_channel
20 #include <lttng/constant.h>
21 #include <lttng/lttng-export.h>
25 Tracing domain type (tracer type).
27 enum lttng_domain_type
{
29 LTTNG_DOMAIN_NONE
= 0,
32 LTTNG_DOMAIN_KERNEL
= 1,
37 /// <code>java.util.logging</code> (JUL).
41 LTTNG_DOMAIN_LOG4J
= 4,
44 LTTNG_DOMAIN_PYTHON
= 5,
49 Buffering scheme of a channel.
51 See \ref api-channel-buf-scheme "Buffering scheme" to learn more.
53 enum lttng_buffer_type
{
54 /// Per-process buffering.
57 /// Per-user buffering.
60 /// Global (Linux kernel) buffering.
65 * The structures should be initialized to zero before use.
67 #define LTTNG_DOMAIN_PADDING1 12
68 #define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
72 Tracing domain summary.
74 Such a structure is involved:
76 - As a member of a \link #lttng_handle recording session handle\endlink.
78 Some functions which require both a \lt_obj_session
79 and a tracing domain accept an #lttng_handle structure.
81 - When you list the tracing domains of a recording session with
84 - When you create a \link #lttng_channel channel summary
85 structure\endlink with lttng_channel_create().
87 You must initialize such a structure to zeros before setting its
88 members and using it, for example:
91 struct lttng_domain domain;
93 memset(&domain, 0, sizeof(domain));
97 /// Tracing domain type.
98 enum lttng_domain_type type
;
102 Buffering scheme of all the channels associated to this tracing
105 enum lttng_buffer_type buf_type
;
107 char padding
[LTTNG_DOMAIN_PADDING1
];
111 char exec_name
[LTTNG_NAME_MAX
];
112 char padding
[LTTNG_DOMAIN_PADDING2
];
120 Sets \lt_p{*domains} to the summaries of the tracing domains which
121 contain at least one channel within the recording session
122 named \lt_p{session_name}.
126 @param[in] session_name
127 Name of the recording session for which to get the tracing domain
131 <strong>On success</strong>, this function sets \lt_p{*domains} to
132 the summaries of the tracing domains.
134 Free \lt_p{*domains} with <code>free()</code>.
138 The number of items in \lt_p{*domains} on success, or a \em negative
139 #lttng_error_code enumerator otherwise.
142 @lt_pre_not_null{session_name}
143 @lt_pre_sess_exists{session_name}
144 @lt_pre_not_null{domains}
146 LTTNG_EXPORT
extern int lttng_list_domains(const char *session_name
, struct lttng_domain
**domains
);
152 #endif /* LTTNG_DOMAIN_H */