Fix: Use 2.12 custom mutex nest getter
[lttng-ust.git] / src / common / events.h
CommitLineData
d871c65b 1/*
c0c0989a 2 * SPDX-License-Identifier: MIT
d871c65b 3 *
c0c0989a 4 * Copyright 2019 (c) Francis Deslauriers <francis.deslauriers@efficios.com>
d871c65b
FD
5 */
6
36c52fff
MJ
7#ifndef _UST_COMMON_UST_EVENTS_H
8#define _UST_COMMON_UST_EVENTS_H
c0c0989a 9
9af5d97a 10#include <limits.h>
d871c65b
FD
11#include <stdint.h>
12
13#include <urcu/list.h>
14#include <urcu/hlist.h>
15
39dac944 16#include <lttng/ust-config.h>
d871c65b
FD
17#include <lttng/ust-events.h>
18
9d315d6d
MJ
19#include "common/macros.h"
20#include "common/ust-context-provider.h"
fd17d7ce 21
bff668bf
MD
22/*
23 * The context procname length is part of the LTTng-UST ABI.
24 * TODO: At the next breaking protocol bump, all users of this macro
25 * should instead use LTTNG_UST_ABI_PROCNAME_LEN.
26 */
27#define LTTNG_UST_CONTEXT_PROCNAME_LEN 17
28
fd17d7ce 29struct lttng_ust_abi_obj;
06cd86a0 30struct lttng_event_notifier_group;
fd17d7ce
MD
31
32union lttng_ust_abi_args {
33 struct {
34 void *chan_data;
35 int wakeup_fd;
36 } channel;
37 struct {
38 int shm_fd;
39 int wakeup_fd;
40 } stream;
41 struct {
42 struct lttng_ust_abi_field_iter entry;
43 } field_list;
44 struct {
45 char *ctxname;
46 } app_context;
47 struct {
48 int event_notifier_notif_fd;
49 } event_notifier_handle;
50 struct {
51 void *counter_data;
52 } counter;
53 struct {
54 int shm_fd;
55 } counter_shm;
56};
57
58struct lttng_ust_abi_objd_ops {
59 long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
60 union lttng_ust_abi_args *args, void *owner);
61 int (*release)(int objd);
62};
63
8665f6a4
MJ
64enum lttng_enabler_format_type {
65 LTTNG_ENABLER_FORMAT_STAR_GLOB,
66 LTTNG_ENABLER_FORMAT_EVENT,
67};
68
69/*
70 * Enabler field, within whatever object is enabling an event. Target of
71 * backward reference.
72 */
73struct lttng_enabler {
74 enum lttng_enabler_format_type format_type;
75
76 /* head list of struct lttng_ust_filter_bytecode_node */
77 struct cds_list_head filter_bytecode_head;
78 /* head list of struct lttng_ust_excluder_node */
79 struct cds_list_head excluder_head;
80
fd17d7ce 81 struct lttng_ust_abi_event event_param;
8665f6a4
MJ
82 unsigned int enabled:1;
83};
84
d871c65b
FD
85struct lttng_event_enabler {
86 struct lttng_enabler base;
87 struct cds_list_head node; /* per-session list of enablers */
e7bc0ef6 88 struct lttng_ust_channel_buffer *chan;
d871c65b
FD
89 /*
90 * Unused, but kept around to make it explicit that the tracer can do
91 * it.
92 */
daacdbfc 93 struct lttng_ust_ctx *ctx;
d871c65b
FD
94};
95
d8d2416d
FD
96struct lttng_event_notifier_enabler {
97 struct lttng_enabler base;
6566528b 98 uint64_t error_counter_index;
d37ecb3f
FD
99 struct cds_list_head node; /* per-app list of event_notifier enablers */
100 struct cds_list_head capture_bytecode_head;
d8d2416d
FD
101 struct lttng_event_notifier_group *group; /* weak ref */
102 uint64_t user_token; /* User-provided token */
d37ecb3f 103 uint64_t num_captures;
d8d2416d
FD
104};
105
22c30e27
MD
106enum lttng_ust_bytecode_type {
107 LTTNG_UST_BYTECODE_TYPE_FILTER,
108 LTTNG_UST_BYTECODE_TYPE_CAPTURE,
ab249ecf
FD
109};
110
111struct lttng_ust_bytecode_node {
22c30e27 112 enum lttng_ust_bytecode_type type;
92495593
FD
113 struct cds_list_head node;
114 struct lttng_enabler *enabler;
ab249ecf
FD
115 struct {
116 uint32_t len;
117 uint32_t reloc_offset;
118 uint64_t seqnum;
119 char data[];
120 } bc;
92495593
FD
121};
122
a2e4d05e
MD
123/*
124 * Bytecode interpreter return value.
125 */
126enum lttng_ust_bytecode_interpreter_ret {
127 LTTNG_UST_BYTECODE_INTERPRETER_ERROR = -1,
128 LTTNG_UST_BYTECODE_INTERPRETER_OK = 0,
129};
130
131struct lttng_interpreter_output;
132struct lttng_ust_bytecode_runtime_private;
133
134enum lttng_ust_bytecode_filter_result {
135 LTTNG_UST_BYTECODE_FILTER_ACCEPT = 0,
136 LTTNG_UST_BYTECODE_FILTER_REJECT = 1,
137};
138
139struct lttng_ust_bytecode_filter_ctx {
140 enum lttng_ust_bytecode_filter_result result;
141};
142
92495593
FD
143struct lttng_ust_excluder_node {
144 struct cds_list_head node;
145 struct lttng_enabler *enabler;
146 /*
147 * struct lttng_ust_event_exclusion had variable sized array,
148 * must be last field.
149 */
fd17d7ce 150 struct lttng_ust_abi_event_exclusion excluder;
92495593
FD
151};
152
bb7ad29d
MJ
153/* Data structures used by the tracer. */
154
155struct tp_list_entry {
fd17d7ce 156 struct lttng_ust_abi_tracepoint_iter tp;
bb7ad29d
MJ
157 struct cds_list_head head;
158};
159
160struct lttng_ust_tracepoint_list {
161 struct tp_list_entry *iter;
162 struct cds_list_head head;
163};
164
165struct tp_field_list_entry {
fd17d7ce 166 struct lttng_ust_abi_field_iter field;
bb7ad29d
MJ
167 struct cds_list_head head;
168};
169
170struct lttng_ust_field_list {
171 struct tp_field_list_entry *iter;
172 struct cds_list_head head;
173};
174
175/*
176 * Objects in a linked-list of enablers, owned by an event or event_notifier.
177 * This is used because an event (or a event_notifier) can be enabled by more
178 * than one enabler and we want a quick way to iterate over all enablers of an
179 * object.
180 *
181 * For example, event rules "my_app:a*" and "my_app:ab*" will both match the
182 * event with the name "my_app:abc".
183 */
184struct lttng_enabler_ref {
185 struct cds_list_head node; /* enabler ref list */
186 struct lttng_enabler *ref; /* backward ref */
187};
188
189#define LTTNG_COUNTER_DIMENSION_MAX 8
190struct lttng_counter_dimension {
191 uint64_t size;
192 uint64_t underflow_index;
193 uint64_t overflow_index;
194 uint8_t has_underflow;
195 uint8_t has_overflow;
196};
197
b5863ea7
MD
198struct lttng_counter_ops {
199 struct lib_counter *(*counter_create)(size_t nr_dimensions,
200 const struct lttng_counter_dimension *dimensions,
201 int64_t global_sum_step,
202 int global_counter_fd,
203 int nr_counter_cpu_fds,
204 const int *counter_cpu_fds,
205 bool is_daemon);
206 void (*counter_destroy)(struct lib_counter *counter);
207 int (*counter_add)(struct lib_counter *counter,
208 const size_t *dimension_indexes, int64_t v);
209 int (*counter_read)(struct lib_counter *counter,
210 const size_t *dimension_indexes, int cpu,
211 int64_t *value, bool *overflow, bool *underflow);
212 int (*counter_aggregate)(struct lib_counter *counter,
213 const size_t *dimension_indexes, int64_t *value,
214 bool *overflow, bool *underflow);
215 int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes);
216};
217
bb7ad29d
MJ
218struct lttng_counter {
219 int objd;
220 struct lttng_event_notifier_group *event_notifier_group; /* owner */
221 struct lttng_counter_transport *transport;
222 struct lib_counter *counter;
223 struct lttng_counter_ops *ops;
224};
225
681f6001
MD
226#define LTTNG_UST_EVENT_HT_BITS 12
227#define LTTNG_UST_EVENT_HT_SIZE (1U << LTTNG_UST_EVENT_HT_BITS)
228
229struct lttng_ust_event_ht {
230 struct cds_hlist_head table[LTTNG_UST_EVENT_HT_SIZE];
231};
232
233#define LTTNG_UST_EVENT_NOTIFIER_HT_BITS 12
234#define LTTNG_UST_EVENT_NOTIFIER_HT_SIZE (1U << LTTNG_UST_EVENT_NOTIFIER_HT_BITS)
235struct lttng_ust_event_notifier_ht {
236 struct cds_hlist_head table[LTTNG_UST_EVENT_NOTIFIER_HT_SIZE];
237};
238
239#define LTTNG_UST_ENUM_HT_BITS 12
240#define LTTNG_UST_ENUM_HT_SIZE (1U << LTTNG_UST_ENUM_HT_BITS)
241
242struct lttng_ust_enum_ht {
243 struct cds_hlist_head table[LTTNG_UST_ENUM_HT_SIZE];
244};
245
bb7ad29d
MJ
246struct lttng_event_notifier_group {
247 int objd;
248 void *owner;
249 int notification_fd;
250 struct cds_list_head node; /* Event notifier group handle list */
251 struct cds_list_head enablers_head;
0c1264b0 252 struct cds_list_head event_notifiers_head; /* list of event_notifiers */
bb7ad29d 253 struct lttng_ust_event_notifier_ht event_notifiers_ht; /* hashtable of event_notifiers */
0c1264b0 254 struct lttng_ust_ctx *ctx; /* contexts for filters. */
bb7ad29d
MJ
255
256 struct lttng_counter *error_counter;
257 size_t error_counter_len;
258};
259
260struct lttng_transport {
74c3f8e2 261 const char *name;
bb7ad29d 262 struct cds_list_head node;
14b6f891 263 struct lttng_ust_channel_buffer_ops ops;
b5457df5 264 const struct lttng_ust_ring_buffer_config *client_config;
bb7ad29d
MJ
265};
266
267struct lttng_counter_transport {
74c3f8e2 268 const char *name;
bb7ad29d
MJ
269 struct cds_list_head node;
270 struct lttng_counter_ops ops;
271 const struct lib_counter_config *client_config;
272};
273
80333dfa 274struct lttng_ust_event_common_private {
7ee76145 275 struct lttng_ust_event_common *pub; /* Public event interface */
68bb7559 276
4e48b5d2 277 const struct lttng_ust_event_desc *desc;
68bb7559
MD
278 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
279 struct cds_list_head enablers_ref_head;
0c1264b0 280 int registered; /* has reg'd tracepoint probe */
115db533 281 uint64_t user_token;
a2e4d05e
MD
282
283 int has_enablers_without_filter_bytecode;
284 /* list of struct lttng_ust_bytecode_runtime, sorted by seqnum */
285 struct cds_list_head filter_bytecode_runtime_head;
68bb7559
MD
286};
287
2e70391c 288struct lttng_ust_event_recorder_private {
80333dfa
MD
289 struct lttng_ust_event_common_private parent;
290
2e70391c 291 struct lttng_ust_event_recorder *pub; /* Public event interface */
ba99fbe2
MD
292 struct cds_list_head node; /* Event recorder list */
293 struct cds_hlist_node hlist; /* Hash table of event recorders */
a40b5b8c 294 struct lttng_ust_ctx *ctx;
8936b6c0 295 unsigned int id;
80333dfa
MD
296};
297
115db533
MD
298struct lttng_ust_event_notifier_private {
299 struct lttng_ust_event_common_private parent;
300
d7d45c0d 301 struct lttng_ust_event_notifier *pub; /* Public event notifier interface */
115db533
MD
302 struct lttng_event_notifier_group *group; /* weak ref */
303 size_t num_captures; /* Needed to allocate the msgpack array. */
304 uint64_t error_counter_index;
ba99fbe2
MD
305 struct cds_list_head node; /* Event notifier list */
306 struct cds_hlist_node hlist; /* Hash table of event notifiers */
a2e4d05e 307 struct cds_list_head capture_bytecode_runtime_head;
a2e4d05e 308};
362a65de 309
a2e4d05e 310struct lttng_ust_bytecode_runtime {
22c30e27 311 enum lttng_ust_bytecode_type type;
362a65de
MD
312 struct lttng_ust_bytecode_node *bc;
313 int link_failed;
a2e4d05e
MD
314 int (*interpreter_func)(struct lttng_ust_bytecode_runtime *bytecode_runtime,
315 const char *interpreter_stack_data,
b2e37d27 316 struct lttng_ust_probe_ctx *probe_ctx,
a2e4d05e 317 void *ctx);
0c1264b0 318 struct cds_list_head node; /* list of bytecode runtime in event */
362a65de
MD
319 /*
320 * Pointer to a URCU-protected pointer owned by an `struct
321 * lttng_session`or `struct lttng_event_notifier_group`.
322 */
daacdbfc 323 struct lttng_ust_ctx **pctx;
362a65de
MD
324};
325
bdb12629 326struct lttng_ust_session_private {
f69fe5fb 327 struct lttng_ust_session *pub; /* Public session interface */
bdb12629
MD
328
329 int been_active; /* Been active ? */
330 int objd; /* Object associated */
331 struct cds_list_head chan_head; /* Channel list head */
332 struct cds_list_head events_head; /* list of events */
333 struct cds_list_head node; /* Session list */
334
bdb12629
MD
335 /* List of enablers */
336 struct cds_list_head enablers_head;
337 struct lttng_ust_event_ht events_ht; /* ht of events */
338 void *owner; /* object owner */
339 int tstate:1; /* Transient enable state */
340
bdb12629
MD
341 int statedump_pending:1;
342
bdb12629
MD
343 struct lttng_ust_enum_ht enums_ht; /* ht of enumerations */
344 struct cds_list_head enums_head;
0c1264b0 345 struct lttng_ust_ctx *ctx; /* contexts for filters. */
9daacd1a
MD
346
347 unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
348 bool uuid_set; /* Is uuid set ? */
bdb12629
MD
349};
350
036d17fb 351struct lttng_enum {
4e48b5d2 352 const struct lttng_ust_enum_desc *desc;
f69fe5fb 353 struct lttng_ust_session *session;
0c1264b0
MD
354 struct cds_list_head node; /* Enum list in session */
355 struct cds_hlist_node hlist; /* Session ht of enums */
356 uint64_t id; /* Enumeration ID in sessiond */
036d17fb
MD
357};
358
e7bc0ef6
MD
359struct lttng_ust_shm_handle;
360
14b6f891
MD
361struct lttng_ust_channel_buffer_ops_private {
362 struct lttng_ust_channel_buffer_ops *pub; /* Public channel buffer ops interface */
a880bae5 363
e7bc0ef6 364 struct lttng_ust_channel_buffer *(*channel_create)(const char *name,
a880bae5
MD
365 void *buf_addr,
366 size_t subbuf_size, size_t num_subbuf,
367 unsigned int switch_timer_interval,
368 unsigned int read_timer_interval,
369 unsigned char *uuid,
370 uint32_t chan_id,
371 const int *stream_fds, int nr_stream_fds,
372 int64_t blocking_timeout);
e7bc0ef6 373 void (*channel_destroy)(struct lttng_ust_channel_buffer *chan);
a880bae5
MD
374 /*
375 * packet_avail_size returns the available size in the current
376 * packet. Note that the size returned is only a hint, since it
377 * may change due to concurrent writes.
378 */
07539b34
MD
379 size_t (*packet_avail_size)(struct lttng_ust_channel_buffer *chan);
380 int (*is_finalized)(struct lttng_ust_channel_buffer *chan);
381 int (*is_disabled)(struct lttng_ust_channel_buffer *chan);
382 int (*flush_buffer)(struct lttng_ust_channel_buffer *chan);
a880bae5
MD
383};
384
e7bc0ef6
MD
385struct lttng_ust_channel_common_private {
386 struct lttng_ust_channel_common *pub; /* Public channel interface */
387
0c1264b0
MD
388 int objd; /* Object associated with channel. */
389 int tstate:1; /* Transient enable state */
e7bc0ef6
MD
390};
391
392struct lttng_ust_channel_buffer_private {
393 struct lttng_ust_channel_common_private parent;
394
395 struct lttng_ust_channel_buffer *pub; /* Public channel buffer interface */
0c1264b0
MD
396 struct cds_list_head node; /* Channel list in session */
397 int header_type; /* 0: unset, 1: compact, 2: large */
398 unsigned int id; /* Channel ID */
e7bc0ef6 399 enum lttng_ust_abi_chan_type type;
0950190a 400 struct lttng_ust_ctx *ctx;
b5457df5 401 struct lttng_ust_ring_buffer_channel *rb_chan; /* Ring buffer channel */
e7bc0ef6
MD
402 unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
403};
404
f0fde1c3
MD
405/*
406 * IMPORTANT: this structure is part of the ABI between the consumer
407 * daemon and the UST library within traced applications. Changing it
408 * breaks the UST communication protocol.
409 *
410 * TODO: remove unused fields on next UST communication protocol
411 * breaking update.
412 */
413struct lttng_ust_abi_channel_config {
414 void *unused1;
415 int unused2;
416 void *unused3;
417 void *unused4;
418 int unused5;
da52433d
MD
419 unsigned int _deprecated1;
420 unsigned int _deprecated2;
f0fde1c3
MD
421 struct cds_list_head unused6;
422 void *unused7;
423 int unused8;
424 void *unused9;
da52433d 425 unsigned int _deprecated3:1;
f0fde1c3
MD
426
427 /* Channel ID */
428 unsigned int id;
429 enum lttng_ust_abi_chan_type unused10;
430 unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
431 int unused11:1;
432};
433
4e48b5d2
MD
434/* Global (filter), event and channel contexts. */
435struct lttng_ust_ctx {
436 struct lttng_ust_ctx_field *fields;
437 unsigned int nr_fields;
438 unsigned int allocated_fields;
439 unsigned int largest_align;
440};
441
442struct lttng_ust_registered_probe {
443 const struct lttng_ust_probe_desc *desc;
444
445 struct cds_list_head head; /* chain registered probes */
446 struct cds_list_head lazy_init_head;
447 int lazy; /* lazy registration */
448};
449
450/*
451 * Context field
452 */
453
454struct lttng_ust_ctx_field {
455 const struct lttng_ust_event_field *event_field;
b2e37d27
MD
456 size_t (*get_size)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
457 size_t offset);
458 void (*record)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
459 struct lttng_ust_ring_buffer_ctx *ctx,
460 struct lttng_ust_channel_buffer *chan);
461 void (*get_value)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
462 struct lttng_ust_ctx_value *value);
4e48b5d2
MD
463 void (*destroy)(void *priv);
464 void *priv;
465};
466
a084756d 467static inline
4e48b5d2 468const struct lttng_ust_type_integer *lttng_ust_get_type_integer(const struct lttng_ust_type_common *type)
a084756d
MD
469{
470 if (type->type != lttng_ust_type_integer)
471 return NULL;
4e48b5d2 472 return caa_container_of(type, const struct lttng_ust_type_integer, parent);
a084756d
MD
473}
474
475static inline
4e48b5d2 476const struct lttng_ust_type_float *lttng_ust_get_type_float(const struct lttng_ust_type_common *type)
a084756d
MD
477{
478 if (type->type != lttng_ust_type_float)
479 return NULL;
4e48b5d2 480 return caa_container_of(type, const struct lttng_ust_type_float, parent);
a084756d
MD
481}
482
483static inline
4e48b5d2 484const struct lttng_ust_type_string *lttng_ust_get_type_string(const struct lttng_ust_type_common *type)
a084756d
MD
485{
486 if (type->type != lttng_ust_type_string)
487 return NULL;
4e48b5d2 488 return caa_container_of(type, const struct lttng_ust_type_string, parent);
a084756d
MD
489}
490
491static inline
4e48b5d2 492const struct lttng_ust_type_enum *lttng_ust_get_type_enum(const struct lttng_ust_type_common *type)
a084756d
MD
493{
494 if (type->type != lttng_ust_type_enum)
495 return NULL;
4e48b5d2 496 return caa_container_of(type, const struct lttng_ust_type_enum, parent);
a084756d
MD
497}
498
499static inline
4e48b5d2 500const struct lttng_ust_type_array *lttng_ust_get_type_array(const struct lttng_ust_type_common *type)
a084756d
MD
501{
502 if (type->type != lttng_ust_type_array)
503 return NULL;
4e48b5d2 504 return caa_container_of(type, const struct lttng_ust_type_array, parent);
a084756d
MD
505}
506
507static inline
4e48b5d2 508const struct lttng_ust_type_sequence *lttng_ust_get_type_sequence(const struct lttng_ust_type_common *type)
a084756d
MD
509{
510 if (type->type != lttng_ust_type_sequence)
511 return NULL;
4e48b5d2 512 return caa_container_of(type, const struct lttng_ust_type_sequence, parent);
a084756d
MD
513}
514
515static inline
4e48b5d2 516const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng_ust_type_common *type)
a084756d
MD
517{
518 if (type->type != lttng_ust_type_struct)
519 return NULL;
4e48b5d2 520 return caa_container_of(type, const struct lttng_ust_type_struct, parent);
a084756d
MD
521}
522
4e48b5d2 523#define lttng_ust_static_type_integer(_size, _alignment, _signedness, _byte_order, _base) \
5defa774 524 ((const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_integer, { \
4e48b5d2
MD
525 .parent = { \
526 .type = lttng_ust_type_integer, \
527 }, \
528 .struct_size = sizeof(struct lttng_ust_type_integer), \
529 .size = (_size), \
530 .alignment = (_alignment), \
531 .signedness = (_signedness), \
baa8acf3 532 .reverse_byte_order = (_byte_order) != LTTNG_UST_BYTE_ORDER, \
4e48b5d2
MD
533 .base = (_base), \
534 }))
535
536#define lttng_ust_static_type_array_text(_length) \
5defa774 537 ((const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \
4e48b5d2
MD
538 .parent = { \
539 .type = lttng_ust_type_array, \
540 }, \
541 .struct_size = sizeof(struct lttng_ust_type_array), \
542 .length = (_length), \
543 .alignment = 0, \
544 .encoding = lttng_ust_string_encoding_UTF8, \
545 .elem_type = lttng_ust_static_type_integer(sizeof(char) * CHAR_BIT, \
546 lttng_ust_rb_alignof(char) * CHAR_BIT, lttng_ust_is_signed_type(char), \
baa8acf3 547 LTTNG_UST_BYTE_ORDER, 10), \
4e48b5d2
MD
548 }))
549
550#define lttng_ust_static_event_field(_name, _type, _nowrite, _nofilter) \
5defa774 551 LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \
4e48b5d2
MD
552 .struct_size = sizeof(struct lttng_ust_event_field), \
553 .name = (_name), \
554 .type = (_type), \
555 .nowrite = (_nowrite), \
556 .nofilter = (_nofilter), \
557 })
558
559#define lttng_ust_static_ctx_field(_event_field, _get_size, _record, _get_value, _destroy, _priv) \
5defa774 560 LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_ctx_field, { \
4e48b5d2
MD
561 .event_field = (_event_field), \
562 .get_size = (_get_size), \
563 .record = (_record), \
564 .get_value = (_get_value), \
565 .destroy = (_destroy), \
566 .priv = (_priv), \
567 })
a084756d 568
d871c65b
FD
569static inline
570struct lttng_enabler *lttng_event_enabler_as_enabler(
571 struct lttng_event_enabler *event_enabler)
572{
573 return &event_enabler->base;
574}
575
d8d2416d
FD
576static inline
577struct lttng_enabler *lttng_event_notifier_enabler_as_enabler(
578 struct lttng_event_notifier_enabler *event_notifier_enabler)
579{
580 return &event_notifier_enabler->base;
581}
d871c65b 582
d8d2416d 583
39dac944
MD
584/* Custom upgrade 2.12 to 2.13 */
585#ifndef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
586#define lttng_ust_dl_update lttng_ust_dl_update1
587#endif
7753d283 588
cbba5e04
MJ
589/* This is ABI between liblttng-ust and liblttng-ust-dl */
590void lttng_ust_dl_update(void *ip);
591
f69fe5fb 592struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session,
4e48b5d2 593 const struct lttng_ust_enum_desc *enum_desc)
1d18d519 594 __attribute__((visibility("hidden")));
7753d283 595
4e48b5d2 596
36c52fff 597#endif /* _UST_COMMON_UST_EVENTS_H */
This page took 0.063362 seconds and 5 git commands to generate.