Fix: C++: incomplete extern C guard transition
[lttng-ust.git] / include / lttng / ust-events.h
CommitLineData
51489cad
MD
1#ifndef _LTTNG_UST_EVENTS_H
2#define _LTTNG_UST_EVENTS_H
8020ceb5
MD
3
4/*
51489cad 5 * lttng/ust-events.h
8020ceb5 6 *
e92f3e28 7 * Copyright 2010-2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8020ceb5
MD
8 *
9 * Holds LTTng per-session event registry.
10 *
e92f3e28
MD
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
a60d70e6 17 *
e92f3e28
MD
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
d2428e87
MD
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
8020ceb5
MD
28 */
29
9f3fdbc6 30#include <urcu/list.h>
1f18504e 31#include <urcu/hlist.h>
9f3fdbc6 32#include <stdint.h>
4318ae1b
MD
33#include <lttng/ust-abi.h>
34#include <lttng/ust-tracer.h>
2ae57758 35#include <lttng/ust-endian.h>
20f1eee7 36#include <float.h>
8020ceb5 37
f5eea432
MD
38#ifdef __cplusplus
39extern "C" {
40#endif
41
19d8b1b3
MD
42#define LTTNG_UST_UUID_LEN 16
43
71d31690
MD
44/*
45 * Tracepoint provider version. Compatibility based on the major number.
46 * Older tracepoint providers can always register to newer lttng-ust
47 * library, but the opposite is rejected: a newer tracepoint provider is
48 * rejected by an older lttng-ust library.
49 */
50#define LTTNG_UST_PROVIDER_MAJOR 1
51#define LTTNG_UST_PROVIDER_MINOR 0
52
7dd08bec
MD
53struct lttng_channel;
54struct lttng_session;
4cfec15c 55struct lttng_ust_lib_ring_buffer_ctx;
8020ceb5 56
37d5e202
MD
57/*
58 * Data structures used by tracepoint event declarations, and by the
59 * tracer. Those structures have padding for future extension.
60 */
61
c1fca457
MD
62/*
63 * LTTng client type enumeration. Used by the consumer to map the
64 * callbacks from its own address space.
65 */
66enum lttng_client_types {
67 LTTNG_CLIENT_METADATA = 0,
68 LTTNG_CLIENT_DISCARD = 1,
69 LTTNG_CLIENT_OVERWRITE = 2,
34a91bdb
MD
70 LTTNG_CLIENT_DISCARD_RT = 3,
71 LTTNG_CLIENT_OVERWRITE_RT = 4,
c1fca457
MD
72 LTTNG_NR_CLIENT_TYPES,
73};
74
8020ceb5
MD
75/* Type description */
76
77/* Update the astract_types name table in lttng-types.c along with this enum */
7dd08bec 78enum lttng_abstract_types {
8020ceb5
MD
79 atype_integer,
80 atype_enum,
81 atype_array,
82 atype_sequence,
83 atype_string,
20f1eee7 84 atype_float,
8020ceb5
MD
85 NR_ABSTRACT_TYPES,
86};
87
88/* Update the string_encodings name table in lttng-types.c along with this enum */
89enum lttng_string_encodings {
90 lttng_encode_none = 0,
91 lttng_encode_UTF8 = 1,
92 lttng_encode_ASCII = 2,
93 NR_STRING_ENCODINGS,
94};
95
37d5e202 96#define LTTNG_UST_ENUM_ENTRY_PADDING 16
8020ceb5
MD
97struct lttng_enum_entry {
98 unsigned long long start, end; /* start and end are inclusive */
99 const char *string;
37d5e202 100 char padding[LTTNG_UST_ENUM_ENTRY_PADDING];
8020ceb5
MD
101};
102
103#define __type_integer(_type, _byte_order, _base, _encoding) \
104 { \
46d52200
ZT
105 .atype = atype_integer, \
106 .u = \
8020ceb5 107 { \
46d52200
ZT
108 .basic = \
109 { \
110 .integer = \
111 { \
112 .size = sizeof(_type) * CHAR_BIT, \
113 .alignment = lttng_alignof(_type) * CHAR_BIT, \
114 .signedness = lttng_is_signed_type(_type), \
115 .reverse_byte_order = _byte_order != BYTE_ORDER, \
116 .base = _base, \
117 .encoding = lttng_encode_##_encoding, \
118 } \
119 } \
8020ceb5
MD
120 }, \
121 } \
122
37d5e202 123#define LTTNG_UST_INTEGER_TYPE_PADDING 24
8020ceb5
MD
124struct lttng_integer_type {
125 unsigned int size; /* in bits */
126 unsigned short alignment; /* in bits */
127 unsigned int signedness:1;
128 unsigned int reverse_byte_order:1;
129 unsigned int base; /* 2, 8, 10, 16, for pretty print */
130 enum lttng_string_encodings encoding;
37d5e202 131 char padding[LTTNG_UST_INTEGER_TYPE_PADDING];
8020ceb5
MD
132};
133
d3ed854b
MD
134/*
135 * Only float and double are supported. long double is not supported at
136 * the moment.
137 */
20f1eee7
MD
138#define _float_mant_dig(_type) \
139 (sizeof(_type) == sizeof(float) ? FLT_MANT_DIG \
140 : (sizeof(_type) == sizeof(double) ? DBL_MANT_DIG \
d3ed854b 141 : 0))
20f1eee7
MD
142
143#define __type_float(_type) \
144 { \
46d52200
ZT
145 .atype = atype_float, \
146 .u = \
20f1eee7 147 { \
46d52200
ZT
148 .basic = \
149 { \
150 ._float = \
151 { \
152 .exp_dig = sizeof(_type) * CHAR_BIT \
153 - _float_mant_dig(_type), \
154 .mant_dig = _float_mant_dig(_type), \
155 .alignment = lttng_alignof(_type) * CHAR_BIT, \
156 .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER, \
157 } \
158 } \
20f1eee7
MD
159 }, \
160 } \
161
37d5e202 162#define LTTNG_UST_FLOAT_TYPE_PADDING 24
20f1eee7
MD
163struct lttng_float_type {
164 unsigned int exp_dig; /* exponent digits, in bits */
165 unsigned int mant_dig; /* mantissa digits, in bits */
166 unsigned short alignment; /* in bits */
167 unsigned int reverse_byte_order:1;
37d5e202 168 char padding[LTTNG_UST_FLOAT_TYPE_PADDING];
20f1eee7
MD
169};
170
37d5e202 171#define LTTNG_UST_BASIC_TYPE_PADDING 128
8020ceb5
MD
172union _lttng_basic_type {
173 struct lttng_integer_type integer;
174 struct {
175 const char *name;
176 } enumeration;
177 struct {
178 enum lttng_string_encodings encoding;
179 } string;
20f1eee7 180 struct lttng_float_type _float;
37d5e202 181 char padding[LTTNG_UST_BASIC_TYPE_PADDING];
8020ceb5
MD
182};
183
184struct lttng_basic_type {
7dd08bec 185 enum lttng_abstract_types atype;
8020ceb5
MD
186 union {
187 union _lttng_basic_type basic;
188 } u;
189};
190
37d5e202 191#define LTTNG_UST_TYPE_PADDING 128
8020ceb5 192struct lttng_type {
7dd08bec 193 enum lttng_abstract_types atype;
8020ceb5
MD
194 union {
195 union _lttng_basic_type basic;
196 struct {
197 struct lttng_basic_type elem_type;
198 unsigned int length; /* num. elems. */
199 } array;
200 struct {
201 struct lttng_basic_type length_type;
202 struct lttng_basic_type elem_type;
203 } sequence;
37d5e202 204 char padding[LTTNG_UST_TYPE_PADDING];
8020ceb5
MD
205 } u;
206};
207
37d5e202 208#define LTTNG_UST_ENUM_TYPE_PADDING 24
8020ceb5
MD
209struct lttng_enum {
210 const char *name;
211 struct lttng_type container_type;
212 const struct lttng_enum_entry *entries;
23c8854a 213 unsigned int len;
37d5e202 214 char padding[LTTNG_UST_ENUM_TYPE_PADDING];
8020ceb5
MD
215};
216
180901e6
MD
217/*
218 * Event field description
219 *
220 * IMPORTANT: this structure is part of the ABI between the probe and
221 * UST. Fields need to be only added at the end, never reordered, never
222 * removed.
223 */
8020ceb5 224
4774c8f3 225#define LTTNG_UST_EVENT_FIELD_PADDING 28
8020ceb5
MD
226struct lttng_event_field {
227 const char *name;
228 struct lttng_type type;
180901e6 229 unsigned int nowrite; /* do not write into trace */
37d5e202 230 char padding[LTTNG_UST_EVENT_FIELD_PADDING];
8020ceb5
MD
231};
232
77aa5901
MD
233union lttng_ctx_value {
234 int64_t s64;
235 const char *str;
236 double d;
237};
238
37d5e202 239#define LTTNG_UST_CTX_FIELD_PADDING 40
8020ceb5
MD
240struct lttng_ctx_field {
241 struct lttng_event_field event_field;
242 size_t (*get_size)(size_t offset);
243 void (*record)(struct lttng_ctx_field *field,
4cfec15c 244 struct lttng_ust_lib_ring_buffer_ctx *ctx,
7dd08bec 245 struct lttng_channel *chan);
77aa5901
MD
246 void (*get_value)(struct lttng_ctx_field *field,
247 union lttng_ctx_value *value);
8020ceb5 248 union {
37d5e202 249 char padding[LTTNG_UST_CTX_FIELD_PADDING];
8020ceb5
MD
250 } u;
251 void (*destroy)(struct lttng_ctx_field *field);
252};
253
37d5e202 254#define LTTNG_UST_CTX_PADDING 24
8020ceb5
MD
255struct lttng_ctx {
256 struct lttng_ctx_field *fields;
257 unsigned int nr_fields;
258 unsigned int allocated_fields;
37d5e202
MD
259 char padding[LTTNG_UST_CTX_PADDING];
260};
261
262#define LTTNG_UST_EVENT_DESC_PADDING 40
263struct lttng_event_desc {
264 const char *name;
fbdeb5ec 265 void (*probe_callback)(void);
37d5e202
MD
266 const struct lttng_event_ctx *ctx; /* context */
267 const struct lttng_event_field *fields; /* event payload */
268 unsigned int nr_fields;
269 const int **loglevel;
68755429 270 const char *signature; /* Argument types/names received */
6ddc916d
MD
271 union {
272 struct {
273 const char **model_emf_uri;
274 } ext;
275 char padding[LTTNG_UST_EVENT_DESC_PADDING];
276 } u;
37d5e202
MD
277};
278
71d31690 279#define LTTNG_UST_PROBE_DESC_PADDING 12
37d5e202
MD
280struct lttng_probe_desc {
281 const char *provider;
282 const struct lttng_event_desc **event_desc;
283 unsigned int nr_events;
284 struct cds_list_head head; /* chain registered probes */
6715d7d1
MD
285 struct cds_list_head lazy_init_head;
286 int lazy; /* lazy registration */
71d31690
MD
287 uint32_t major;
288 uint32_t minor;
37d5e202 289 char padding[LTTNG_UST_PROBE_DESC_PADDING];
8020ceb5
MD
290};
291
37d5e202
MD
292/* Data structures used by the tracer. */
293
e58095ef
MD
294enum lttng_enabler_type {
295 LTTNG_ENABLER_WILDCARD,
296 LTTNG_ENABLER_EVENT,
e6c12e3d
MD
297};
298
299/*
e58095ef
MD
300 * Enabler field, within whatever object is enabling an event. Target of
301 * backward reference.
e6c12e3d 302 */
e58095ef
MD
303struct lttng_enabler {
304 enum lttng_enabler_type type;
305
306 /* head list of struct lttng_ust_filter_bytecode_node */
307 struct cds_list_head filter_bytecode_head;
308 struct cds_list_head node; /* per-session list of enablers */
309
310 struct lttng_ust_event event_param;
311 struct lttng_channel *chan;
312 struct lttng_ctx *ctx;
313 unsigned int enabled:1;
e6c12e3d
MD
314};
315
c8fcf224
MD
316struct tp_list_entry {
317 struct lttng_ust_tracepoint_iter tp;
318 struct cds_list_head head;
319};
320
321struct lttng_ust_tracepoint_list {
322 struct tp_list_entry *iter;
323 struct cds_list_head head;
8020ceb5
MD
324};
325
06d4f27e
MD
326struct tp_field_list_entry {
327 struct lttng_ust_field_iter field;
328 struct cds_list_head head;
329};
330
331struct lttng_ust_field_list {
332 struct tp_field_list_entry *iter;
333 struct cds_list_head head;
334};
335
8165c8da 336struct ust_pending_probe;
7dd08bec 337struct lttng_event;
f488575f
MD
338
339struct lttng_ust_filter_bytecode_node {
340 struct cds_list_head node;
e58095ef 341 struct lttng_enabler *enabler;
a543151c
MD
342 /*
343 * struct lttng_ust_filter_bytecode has var. sized array, must
344 * be last field.
345 */
346 struct lttng_ust_filter_bytecode bc;
f488575f
MD
347};
348
8a92ed2a
MD
349/*
350 * Filter return value masks.
351 */
352enum lttng_filter_ret {
353 LTTNG_FILTER_DISCARD = 0,
354 LTTNG_FILTER_RECORD_FLAG = (1ULL << 0),
355 /* Other bits are kept for future use. */
356};
357
f488575f
MD
358struct lttng_bytecode_runtime {
359 /* Associated bytecode */
360 struct lttng_ust_filter_bytecode_node *bc;
8a92ed2a 361 uint64_t (*filter)(void *filter_data, const char *filter_stack_data);
21af05a9 362 int link_failed;
e58095ef
MD
363 struct cds_list_head node; /* list of bytecode runtime in event */
364};
365
366/*
367 * Objects in a linked-list of enablers, owned by an event.
368 */
369struct lttng_enabler_ref {
370 struct cds_list_head node; /* enabler ref list */
371 struct lttng_enabler *ref; /* backward ref */
f488575f 372};
8165c8da 373
8020ceb5 374/*
7dd08bec
MD
375 * lttng_event structure is referred to by the tracing fast path. It
376 * must be kept small.
180901e6
MD
377 *
378 * IMPORTANT: this structure is part of the ABI between the probe and
379 * UST. Fields need to be only added at the end, never reordered, never
380 * removed.
8020ceb5 381 */
7dd08bec 382struct lttng_event {
180901e6 383 /* LTTng-UST 2.0 starts here */
8020ceb5 384 unsigned int id;
7dd08bec 385 struct lttng_channel *chan;
976fe9ea 386 int enabled;
8020ceb5 387 const struct lttng_event_desc *desc;
e58095ef 388 void *_deprecated1;
8020ceb5 389 struct lttng_ctx *ctx;
9f3fdbc6 390 enum lttng_ust_instrumentation instrumentation;
8020ceb5 391 union {
8020ceb5 392 } u;
e58095ef
MD
393 struct cds_list_head node; /* Event list in session */
394 struct cds_list_head _deprecated2;
395 void *_deprecated3;
13b21cd6 396 unsigned int _deprecated4:1;
e58095ef 397
180901e6 398 /* LTTng-UST 2.1 starts here */
e58095ef
MD
399 /* list of struct lttng_bytecode_runtime, sorted by seqnum */
400 struct cds_list_head bytecode_runtime_head;
dcdeaff0 401 int has_enablers_without_bytecode;
e58095ef
MD
402 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
403 struct cds_list_head enablers_ref_head;
d56fa719 404 struct cds_hlist_node hlist; /* session ht of events */
ac6b4ac6 405 int registered; /* has reg'd tracepoint probe */
8020ceb5
MD
406};
407
8d8a24c8 408struct channel;
38fae1d3 409struct lttng_ust_shm_handle;
8d8a24c8 410
180901e6
MD
411/*
412 * IMPORTANT: this structure is part of the ABI between the probe and
413 * UST. Fields need to be only added at the end, never reordered, never
414 * removed.
415 */
7dd08bec
MD
416struct lttng_channel_ops {
417 struct lttng_channel *(*channel_create)(const char *name,
74d81a6c
MD
418 void *buf_addr,
419 size_t subbuf_size, size_t num_subbuf,
420 unsigned int switch_timer_interval,
421 unsigned int read_timer_interval,
6ca18e66
MD
422 unsigned char *uuid,
423 uint32_t chan_id);
74d81a6c 424 void (*channel_destroy)(struct lttng_channel *chan);
9e917229
MD
425 void *_deprecated1;
426 void *_deprecated2;
4cfec15c 427 int (*event_reserve)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
8020ceb5 428 uint32_t event_id);
4cfec15c 429 void (*event_commit)(struct lttng_ust_lib_ring_buffer_ctx *ctx);
74d81a6c
MD
430 void (*event_write)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
431 const void *src, size_t len);
8020ceb5
MD
432 /*
433 * packet_avail_size returns the available size in the current
434 * packet. Note that the size returned is only a hint, since it
435 * may change due to concurrent writes.
436 */
1d498196 437 size_t (*packet_avail_size)(struct channel *chan,
38fae1d3 438 struct lttng_ust_shm_handle *handle);
9f3fdbc6
MD
439 //wait_queue_head_t *(*get_reader_wait_queue)(struct channel *chan);
440 //wait_queue_head_t *(*get_hp_wait_queue)(struct channel *chan);
8020ceb5
MD
441 int (*is_finalized)(struct channel *chan);
442 int (*is_disabled)(struct channel *chan);
38fae1d3 443 int (*flush_buffer)(struct channel *chan, struct lttng_ust_shm_handle *handle);
8020ceb5
MD
444};
445
180901e6
MD
446/*
447 * IMPORTANT: this structure is part of the ABI between the probe and
448 * UST. Fields need to be only added at the end, never reordered, never
449 * removed.
450 */
7dd08bec 451struct lttng_channel {
a3f61e7f
MD
452 /*
453 * The pointers located in this private data are NOT safe to be
454 * dereferenced by the consumer. The only operations the
455 * consumer process is designed to be allowed to do is to read
456 * and perform subbuffer flush.
457 */
8020ceb5 458 struct channel *chan; /* Channel buffers */
976fe9ea 459 int enabled;
8020ceb5
MD
460 struct lttng_ctx *ctx;
461 /* Event ID management */
7dd08bec 462 struct lttng_session *session;
0a42beb6 463 int objd; /* Object associated to channel */
32ce8569
MD
464 unsigned int _deprecated1;
465 unsigned int _deprecated2;
e58095ef 466 struct cds_list_head node; /* Channel list in session */
74d81a6c 467 const struct lttng_channel_ops *ops;
8020ceb5 468 int header_type; /* 0: unset, 1: compact, 2: large */
38fae1d3 469 struct lttng_ust_shm_handle *handle; /* shared-memory handle */
13b21cd6 470 unsigned int _deprecated3:1;
a3f61e7f 471
74d81a6c 472 /* Channel ID */
a3f61e7f 473 unsigned int id;
74d81a6c 474 enum lttng_ust_chan_type type;
19d8b1b3 475 unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
ac6b4ac6 476 int tstate:1; /* Transient enable state */
8020ceb5
MD
477};
478
71a9d034 479#define LTTNG_UST_EVENT_HT_BITS 12
e58095ef
MD
480#define LTTNG_UST_EVENT_HT_SIZE (1U << LTTNG_UST_EVENT_HT_BITS)
481
482struct lttng_ust_event_ht {
483 struct cds_hlist_head table[LTTNG_UST_EVENT_HT_SIZE];
484};
485
180901e6
MD
486/*
487 * IMPORTANT: this structure is part of the ABI between the probe and
488 * UST. Fields need to be only added at the end, never reordered, never
489 * removed.
490 */
7dd08bec 491struct lttng_session {
e58095ef
MD
492 int active; /* Is trace session active ? */
493 int been_active; /* Been active ? */
494 int objd; /* Object associated */
13b21cd6 495 void *_deprecated1;
e58095ef
MD
496 struct cds_list_head chan_head; /* Channel list head */
497 struct cds_list_head events_head; /* list of events */
13b21cd6 498 struct cds_list_head _deprecated2;
e58095ef 499 struct cds_list_head node; /* Session list */
13b21cd6
MD
500 int _deprecated3;
501 unsigned int _deprecated4:1;
e58095ef
MD
502
503 /* New UST 2.1 */
504 /* List of enablers */
505 struct cds_list_head enablers_head;
d56fa719 506 struct lttng_ust_event_ht events_ht; /* ht of events */
32ce8569 507 void *owner; /* object owner */
ac6b4ac6 508 int tstate:1; /* Transient enable state */
8020ceb5
MD
509};
510
7dd08bec 511struct lttng_transport {
8020ceb5 512 char *name;
9f3fdbc6 513 struct cds_list_head node;
7dd08bec 514 struct lttng_channel_ops ops;
74d81a6c 515 const struct lttng_ust_lib_ring_buffer_config *client_config;
8020ceb5
MD
516};
517
7dd08bec
MD
518struct lttng_session *lttng_session_create(void);
519int lttng_session_enable(struct lttng_session *session);
520int lttng_session_disable(struct lttng_session *session);
521void lttng_session_destroy(struct lttng_session *session);
8020ceb5 522
7dd08bec 523struct lttng_channel *lttng_channel_create(struct lttng_session *session,
8020ceb5
MD
524 const char *transport_name,
525 void *buf_addr,
526 size_t subbuf_size, size_t num_subbuf,
527 unsigned int switch_timer_interval,
193183fb 528 unsigned int read_timer_interval,
ef9ff354
MD
529 int **shm_fd, int **wait_fd,
530 uint64_t **memory_map_size,
7dd08bec 531 struct lttng_channel *chan_priv_init);
8020ceb5 532
7dd08bec
MD
533int lttng_channel_enable(struct lttng_channel *channel);
534int lttng_channel_disable(struct lttng_channel *channel);
e58095ef
MD
535
536struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
537 struct lttng_ust_event *event_param,
538 struct lttng_channel *chan);
539int lttng_enabler_enable(struct lttng_enabler *enabler);
540int lttng_enabler_disable(struct lttng_enabler *enabler);
541int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
542 struct lttng_ust_filter_bytecode_node *bytecode);
543int lttng_enabler_attach_context(struct lttng_enabler *enabler,
544 struct lttng_ust_context *ctx);
545
546int lttng_attach_context(struct lttng_ust_context *context_param,
547 struct lttng_ctx **ctx, struct lttng_session *session);
a0a3bef9
MD
548void lttng_context_init(void);
549void lttng_context_exit(void);
1d507380 550extern struct lttng_ctx *lttng_static_ctx; /* Used by filtering */
976fe9ea 551
7dd08bec
MD
552void lttng_transport_register(struct lttng_transport *transport);
553void lttng_transport_unregister(struct lttng_transport *transport);
8020ceb5 554
4b4de73e 555void synchronize_trace(void);
8020ceb5 556
7dd08bec
MD
557int lttng_probe_register(struct lttng_probe_desc *desc);
558void lttng_probe_unregister(struct lttng_probe_desc *desc);
5f733922 559int lttng_fix_pending_events(void);
7dd08bec
MD
560int lttng_probes_init(void);
561void lttng_probes_exit(void);
8173ec7c 562int lttng_find_context(struct lttng_ctx *ctx, const char *name);
77aa5901 563int lttng_get_context_index(struct lttng_ctx *ctx, const char *name);
8173ec7c
MD
564struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx_p);
565void lttng_remove_context_field(struct lttng_ctx **ctx_p,
8020ceb5
MD
566 struct lttng_ctx_field *field);
567void lttng_destroy_context(struct lttng_ctx *ctx);
3b402b40 568int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx);
c1ef86f0 569int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx);
8173ec7c 570int lttng_add_pthread_id_to_ctx(struct lttng_ctx **ctx);
4847e9bb 571int lttng_add_procname_to_ctx(struct lttng_ctx **ctx);
96f85541 572int lttng_add_ip_to_ctx(struct lttng_ctx **ctx);
a93bfc45 573void lttng_context_vtid_reset(void);
c1ef86f0 574void lttng_context_vpid_reset(void);
9f3fdbc6 575
5a821cd6
MD
576extern const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_metadata;
577extern const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_discard;
578extern const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_overwrite;
c1fca457 579
7dd08bec 580struct lttng_transport *lttng_transport_find(const char *name);
c1fca457 581
7dd08bec
MD
582int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list);
583void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list);
c8fcf224
MD
584struct lttng_ust_tracepoint_iter *
585 lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list);
7dd08bec
MD
586int lttng_probes_get_field_list(struct lttng_ust_field_list *list);
587void lttng_probes_prune_field_list(struct lttng_ust_field_list *list);
06d4f27e
MD
588struct lttng_ust_field_iter *
589 lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list);
c8fcf224 590
7dd08bec 591void lttng_filter_event_link_bytecode(struct lttng_event *event);
e58095ef
MD
592void lttng_enabler_event_link_bytecode(struct lttng_event *event,
593 struct lttng_enabler *enabler);
7dd08bec 594void lttng_free_event_filter_runtime(struct lttng_event *event);
e58095ef
MD
595void lttng_filter_sync_state(struct lttng_bytecode_runtime *runtime);
596
597struct cds_list_head *lttng_get_probe_list_head(void);
6715d7d1 598int lttng_session_active(void);
e6c12e3d 599
f5eea432
MD
600#ifdef __cplusplus
601}
602#endif
603
51489cad 604#endif /* _LTTNG_UST_EVENTS_H */
This page took 0.060824 seconds and 4 git commands to generate.