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,
47 LTTNG_DOMAIN_LOG4J2
= 6,
52 Buffering scheme of a channel.
54 See \ref api-channel-buf-scheme "Buffering scheme" to learn more.
56 enum lttng_buffer_type
{
57 /// Per-process buffering.
60 /// Per-user buffering.
63 /// Global (Linux kernel) buffering.
68 * The structures should be initialized to zero before use.
70 #define LTTNG_DOMAIN_PADDING1 12
71 #define LTTNG_DOMAIN_PADDING2 (LTTNG_SYMBOL_NAME_LEN + 32)
75 Tracing domain summary.
77 Such a structure is involved:
79 - As a member of a \link #lttng_handle recording session handle\endlink.
81 Some functions which require both a \lt_obj_session
82 and a tracing domain accept an #lttng_handle structure.
84 - When you list the tracing domains of a recording session with
87 - When you create a \link #lttng_channel channel summary
88 structure\endlink with lttng_channel_create().
90 You must initialize such a structure to zeros before setting its
91 members and using it, for example:
94 struct lttng_domain domain;
96 memset(&domain, 0, sizeof(domain));
100 /// Tracing domain type.
101 enum lttng_domain_type type
;
105 Buffering scheme of all the channels associated to this tracing
108 enum lttng_buffer_type buf_type
;
110 char padding
[LTTNG_DOMAIN_PADDING1
];
114 char exec_name
[LTTNG_NAME_MAX
];
115 char padding
[LTTNG_DOMAIN_PADDING2
];
123 Sets \lt_p{*domains} to the summaries of the tracing domains which
124 contain at least one channel within the recording session
125 named \lt_p{session_name}.
129 @param[in] session_name
130 Name of the recording session for which to get the tracing domain
134 <strong>On success</strong>, this function sets \lt_p{*domains} to
135 the summaries of the tracing domains.
137 Free \lt_p{*domains} with <code>free()</code>.
141 The number of items in \lt_p{*domains} on success, or a \em negative
142 #lttng_error_code enumerator otherwise.
145 @lt_pre_not_null{session_name}
146 @lt_pre_sess_exists{session_name}
147 @lt_pre_not_null{domains}
149 LTTNG_EXPORT
extern int lttng_list_domains(const char *session_name
, struct lttng_domain
**domains
);
155 #endif /* LTTNG_DOMAIN_H */