Refactoring: remove struct_size from struct lttng_ust_ctx_value
[lttng-ust.git] / liblttng-ust / ust-events-internal.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
c0c0989a
MJ
7#ifndef _LTTNG_UST_EVENTS_INTERNAL_H
8#define _LTTNG_UST_EVENTS_INTERNAL_H
9
d871c65b
FD
10#include <stdint.h>
11
12#include <urcu/list.h>
13#include <urcu/hlist.h>
14
d871c65b
FD
15#include <lttng/ust-events.h>
16
fa194c41 17#include "ust-context-provider.h"
fd17d7ce
MD
18
19struct lttng_ust_abi_obj;
06cd86a0 20struct lttng_event_notifier_group;
fd17d7ce
MD
21
22union lttng_ust_abi_args {
23 struct {
24 void *chan_data;
25 int wakeup_fd;
26 } channel;
27 struct {
28 int shm_fd;
29 int wakeup_fd;
30 } stream;
31 struct {
32 struct lttng_ust_abi_field_iter entry;
33 } field_list;
34 struct {
35 char *ctxname;
36 } app_context;
37 struct {
38 int event_notifier_notif_fd;
39 } event_notifier_handle;
40 struct {
41 void *counter_data;
42 } counter;
43 struct {
44 int shm_fd;
45 } counter_shm;
46};
47
48struct lttng_ust_abi_objd_ops {
49 long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
50 union lttng_ust_abi_args *args, void *owner);
51 int (*release)(int objd);
52};
53
8665f6a4
MJ
54enum lttng_enabler_format_type {
55 LTTNG_ENABLER_FORMAT_STAR_GLOB,
56 LTTNG_ENABLER_FORMAT_EVENT,
57};
58
59/*
60 * Enabler field, within whatever object is enabling an event. Target of
61 * backward reference.
62 */
63struct lttng_enabler {
64 enum lttng_enabler_format_type format_type;
65
66 /* head list of struct lttng_ust_filter_bytecode_node */
67 struct cds_list_head filter_bytecode_head;
68 /* head list of struct lttng_ust_excluder_node */
69 struct cds_list_head excluder_head;
70
fd17d7ce 71 struct lttng_ust_abi_event event_param;
8665f6a4
MJ
72 unsigned int enabled:1;
73};
74
d871c65b
FD
75struct lttng_event_enabler {
76 struct lttng_enabler base;
77 struct cds_list_head node; /* per-session list of enablers */
78 struct lttng_channel *chan;
79 /*
80 * Unused, but kept around to make it explicit that the tracer can do
81 * it.
82 */
daacdbfc 83 struct lttng_ust_ctx *ctx;
d871c65b
FD
84};
85
d8d2416d
FD
86struct lttng_event_notifier_enabler {
87 struct lttng_enabler base;
6566528b 88 uint64_t error_counter_index;
d37ecb3f
FD
89 struct cds_list_head node; /* per-app list of event_notifier enablers */
90 struct cds_list_head capture_bytecode_head;
d8d2416d
FD
91 struct lttng_event_notifier_group *group; /* weak ref */
92 uint64_t user_token; /* User-provided token */
d37ecb3f 93 uint64_t num_captures;
d8d2416d
FD
94};
95
ab249ecf
FD
96enum lttng_ust_bytecode_node_type {
97 LTTNG_UST_BYTECODE_NODE_TYPE_FILTER,
d37ecb3f 98 LTTNG_UST_BYTECODE_NODE_TYPE_CAPTURE,
ab249ecf
FD
99};
100
101struct lttng_ust_bytecode_node {
102 enum lttng_ust_bytecode_node_type type;
92495593
FD
103 struct cds_list_head node;
104 struct lttng_enabler *enabler;
ab249ecf
FD
105 struct {
106 uint32_t len;
107 uint32_t reloc_offset;
108 uint64_t seqnum;
109 char data[];
110 } bc;
92495593
FD
111};
112
113struct lttng_ust_excluder_node {
114 struct cds_list_head node;
115 struct lttng_enabler *enabler;
116 /*
117 * struct lttng_ust_event_exclusion had variable sized array,
118 * must be last field.
119 */
fd17d7ce 120 struct lttng_ust_abi_event_exclusion excluder;
92495593
FD
121};
122
bb7ad29d
MJ
123/* Data structures used by the tracer. */
124
125struct tp_list_entry {
fd17d7ce 126 struct lttng_ust_abi_tracepoint_iter tp;
bb7ad29d
MJ
127 struct cds_list_head head;
128};
129
130struct lttng_ust_tracepoint_list {
131 struct tp_list_entry *iter;
132 struct cds_list_head head;
133};
134
135struct tp_field_list_entry {
fd17d7ce 136 struct lttng_ust_abi_field_iter field;
bb7ad29d
MJ
137 struct cds_list_head head;
138};
139
140struct lttng_ust_field_list {
141 struct tp_field_list_entry *iter;
142 struct cds_list_head head;
143};
144
145/*
146 * Objects in a linked-list of enablers, owned by an event or event_notifier.
147 * This is used because an event (or a event_notifier) can be enabled by more
148 * than one enabler and we want a quick way to iterate over all enablers of an
149 * object.
150 *
151 * For example, event rules "my_app:a*" and "my_app:ab*" will both match the
152 * event with the name "my_app:abc".
153 */
154struct lttng_enabler_ref {
155 struct cds_list_head node; /* enabler ref list */
156 struct lttng_enabler *ref; /* backward ref */
157};
158
159#define LTTNG_COUNTER_DIMENSION_MAX 8
160struct lttng_counter_dimension {
161 uint64_t size;
162 uint64_t underflow_index;
163 uint64_t overflow_index;
164 uint8_t has_underflow;
165 uint8_t has_overflow;
166};
167
b5863ea7
MD
168struct lttng_counter_ops {
169 struct lib_counter *(*counter_create)(size_t nr_dimensions,
170 const struct lttng_counter_dimension *dimensions,
171 int64_t global_sum_step,
172 int global_counter_fd,
173 int nr_counter_cpu_fds,
174 const int *counter_cpu_fds,
175 bool is_daemon);
176 void (*counter_destroy)(struct lib_counter *counter);
177 int (*counter_add)(struct lib_counter *counter,
178 const size_t *dimension_indexes, int64_t v);
179 int (*counter_read)(struct lib_counter *counter,
180 const size_t *dimension_indexes, int cpu,
181 int64_t *value, bool *overflow, bool *underflow);
182 int (*counter_aggregate)(struct lib_counter *counter,
183 const size_t *dimension_indexes, int64_t *value,
184 bool *overflow, bool *underflow);
185 int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes);
186};
187
bb7ad29d
MJ
188struct lttng_counter {
189 int objd;
190 struct lttng_event_notifier_group *event_notifier_group; /* owner */
191 struct lttng_counter_transport *transport;
192 struct lib_counter *counter;
193 struct lttng_counter_ops *ops;
194};
195
681f6001
MD
196#define LTTNG_UST_EVENT_HT_BITS 12
197#define LTTNG_UST_EVENT_HT_SIZE (1U << LTTNG_UST_EVENT_HT_BITS)
198
199struct lttng_ust_event_ht {
200 struct cds_hlist_head table[LTTNG_UST_EVENT_HT_SIZE];
201};
202
203#define LTTNG_UST_EVENT_NOTIFIER_HT_BITS 12
204#define LTTNG_UST_EVENT_NOTIFIER_HT_SIZE (1U << LTTNG_UST_EVENT_NOTIFIER_HT_BITS)
205struct lttng_ust_event_notifier_ht {
206 struct cds_hlist_head table[LTTNG_UST_EVENT_NOTIFIER_HT_SIZE];
207};
208
209#define LTTNG_UST_ENUM_HT_BITS 12
210#define LTTNG_UST_ENUM_HT_SIZE (1U << LTTNG_UST_ENUM_HT_BITS)
211
212struct lttng_ust_enum_ht {
213 struct cds_hlist_head table[LTTNG_UST_ENUM_HT_SIZE];
214};
215
bb7ad29d
MJ
216struct lttng_event_notifier_group {
217 int objd;
218 void *owner;
219 int notification_fd;
220 struct cds_list_head node; /* Event notifier group handle list */
221 struct cds_list_head enablers_head;
222 struct cds_list_head event_notifiers_head; /* list of event_notifiers */
223 struct lttng_ust_event_notifier_ht event_notifiers_ht; /* hashtable of event_notifiers */
daacdbfc 224 struct lttng_ust_ctx *ctx; /* contexts for filters. */
bb7ad29d
MJ
225
226 struct lttng_counter *error_counter;
227 size_t error_counter_len;
228};
229
230struct lttng_transport {
231 char *name;
232 struct cds_list_head node;
49926dbd 233 struct lttng_ust_channel_ops ops;
bb7ad29d
MJ
234 const struct lttng_ust_lib_ring_buffer_config *client_config;
235};
236
237struct lttng_counter_transport {
238 char *name;
239 struct cds_list_head node;
240 struct lttng_counter_ops ops;
241 const struct lib_counter_config *client_config;
242};
243
80333dfa 244struct lttng_ust_event_common_private {
7ee76145 245 struct lttng_ust_event_common *pub; /* Public event interface */
68bb7559 246
dc11f93f 247 const struct lttng_ust_event_desc *desc;
68bb7559
MD
248 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
249 struct cds_list_head enablers_ref_head;
68bb7559 250 int registered; /* has reg'd tracepoint probe */
115db533 251 uint64_t user_token;
68bb7559
MD
252};
253
2e70391c 254struct lttng_ust_event_recorder_private {
80333dfa
MD
255 struct lttng_ust_event_common_private parent;
256
2e70391c 257 struct lttng_ust_event_recorder *pub; /* Public event interface */
ba99fbe2
MD
258 struct cds_list_head node; /* Event recorder list */
259 struct cds_hlist_node hlist; /* Hash table of event recorders */
80333dfa
MD
260};
261
115db533
MD
262struct lttng_ust_event_notifier_private {
263 struct lttng_ust_event_common_private parent;
264
d7d45c0d 265 struct lttng_ust_event_notifier *pub; /* Public event notifier interface */
115db533
MD
266 struct lttng_event_notifier_group *group; /* weak ref */
267 size_t num_captures; /* Needed to allocate the msgpack array. */
268 uint64_t error_counter_index;
ba99fbe2
MD
269 struct cds_list_head node; /* Event notifier list */
270 struct cds_hlist_node hlist; /* Hash table of event notifiers */
115db533
MD
271};
272
362a65de
MD
273struct lttng_ust_bytecode_runtime_private {
274 struct bytecode_runtime *pub; /* Public bytecode runtime interface */
275
276 struct lttng_ust_bytecode_node *bc;
277 int link_failed;
278 /*
279 * Pointer to a URCU-protected pointer owned by an `struct
280 * lttng_session`or `struct lttng_event_notifier_group`.
281 */
daacdbfc 282 struct lttng_ust_ctx **pctx;
362a65de
MD
283};
284
bdb12629 285struct lttng_ust_session_private {
f69fe5fb 286 struct lttng_ust_session *pub; /* Public session interface */
bdb12629
MD
287
288 int been_active; /* Been active ? */
289 int objd; /* Object associated */
290 struct cds_list_head chan_head; /* Channel list head */
291 struct cds_list_head events_head; /* list of events */
292 struct cds_list_head node; /* Session list */
293
294 /* New UST 2.1 */
295 /* List of enablers */
296 struct cds_list_head enablers_head;
297 struct lttng_ust_event_ht events_ht; /* ht of events */
298 void *owner; /* object owner */
299 int tstate:1; /* Transient enable state */
300
301 /* New UST 2.4 */
302 int statedump_pending:1;
303
304 /* New UST 2.8 */
305 struct lttng_ust_enum_ht enums_ht; /* ht of enumerations */
306 struct cds_list_head enums_head;
daacdbfc 307 struct lttng_ust_ctx *ctx; /* contexts for filters. */
bdb12629
MD
308};
309
036d17fb
MD
310struct lttng_enum {
311 const struct lttng_ust_enum_desc *desc;
f69fe5fb 312 struct lttng_ust_session *session;
036d17fb
MD
313 struct cds_list_head node; /* Enum list in session */
314 struct cds_hlist_node hlist; /* Session ht of enums */
315 uint64_t id; /* Enumeration ID in sessiond */
316};
317
a880bae5
MD
318struct lttng_ust_channel_ops_private {
319 struct lttng_ust_channel_ops *pub; /* Public channels ops interface */
320
321 struct lttng_channel *(*channel_create)(const char *name,
322 void *buf_addr,
323 size_t subbuf_size, size_t num_subbuf,
324 unsigned int switch_timer_interval,
325 unsigned int read_timer_interval,
326 unsigned char *uuid,
327 uint32_t chan_id,
328 const int *stream_fds, int nr_stream_fds,
329 int64_t blocking_timeout);
330 void (*channel_destroy)(struct lttng_channel *chan);
331 /*
332 * packet_avail_size returns the available size in the current
333 * packet. Note that the size returned is only a hint, since it
334 * may change due to concurrent writes.
335 */
336 size_t (*packet_avail_size)(struct lttng_ust_lib_ring_buffer_channel *chan,
337 struct lttng_ust_shm_handle *handle);
338 int (*is_finalized)(struct lttng_ust_lib_ring_buffer_channel *chan);
339 int (*is_disabled)(struct lttng_ust_lib_ring_buffer_channel *chan);
340 int (*flush_buffer)(struct lttng_ust_lib_ring_buffer_channel *chan,
341 struct lttng_ust_shm_handle *handle);
342};
343
d871c65b
FD
344static inline
345struct lttng_enabler *lttng_event_enabler_as_enabler(
346 struct lttng_event_enabler *event_enabler)
347{
348 return &event_enabler->base;
349}
350
d8d2416d
FD
351static inline
352struct lttng_enabler *lttng_event_notifier_enabler_as_enabler(
353 struct lttng_event_notifier_enabler *event_notifier_enabler)
354{
355 return &event_notifier_enabler->base;
356}
d871c65b
FD
357
358/*
359 * Allocate and initialize a `struct lttng_event_enabler` object.
360 *
361 * On success, returns a `struct lttng_event_enabler`,
362 * On memory error, returns NULL.
363 */
ddabe860 364__attribute__((visibility("hidden")))
d871c65b
FD
365struct lttng_event_enabler *lttng_event_enabler_create(
366 enum lttng_enabler_format_type format_type,
fd17d7ce 367 struct lttng_ust_abi_event *event_param,
d871c65b
FD
368 struct lttng_channel *chan);
369
370/*
371 * Destroy a `struct lttng_event_enabler` object.
372 */
ddabe860 373__attribute__((visibility("hidden")))
d871c65b
FD
374void lttng_event_enabler_destroy(struct lttng_event_enabler *enabler);
375
376/*
377 * Enable a `struct lttng_event_enabler` object and all events related to this
378 * enabler.
379 */
ddabe860 380__attribute__((visibility("hidden")))
d871c65b
FD
381int lttng_event_enabler_enable(struct lttng_event_enabler *enabler);
382
383/*
384 * Disable a `struct lttng_event_enabler` object and all events related to this
385 * enabler.
386 */
ddabe860 387__attribute__((visibility("hidden")))
d871c65b
FD
388int lttng_event_enabler_disable(struct lttng_event_enabler *enabler);
389
390/*
391 * Attach filter bytecode program to `struct lttng_event_enabler` and all
392 * events related to this enabler.
393 */
ddabe860 394__attribute__((visibility("hidden")))
a56fd376
FD
395int lttng_event_enabler_attach_filter_bytecode(
396 struct lttng_event_enabler *enabler,
ab89263e 397 struct lttng_ust_bytecode_node **bytecode);
d871c65b
FD
398
399/*
400 * Attach an application context to an event enabler.
401 *
402 * Not implemented.
403 */
ddabe860 404__attribute__((visibility("hidden")))
d871c65b 405int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
fd17d7ce 406 struct lttng_ust_abi_context *ctx);
d871c65b
FD
407
408/*
409 * Attach exclusion list to `struct lttng_event_enabler` and all
410 * events related to this enabler.
411 */
ddabe860 412__attribute__((visibility("hidden")))
d871c65b 413int lttng_event_enabler_attach_exclusion(struct lttng_event_enabler *enabler,
e9fe6aad 414 struct lttng_ust_excluder_node **excluder);
d871c65b
FD
415
416/*
d37ecb3f
FD
417 * Synchronize bytecodes for the enabler and the instance (event or
418 * event_notifier).
d871c65b 419 *
621c07fc 420 * This function goes over all bytecode programs of the enabler (event or
d37ecb3f 421 * event_notifier enabler) to ensure each is linked to the provided instance.
d871c65b 422 */
ddabe860 423__attribute__((visibility("hidden")))
dc11f93f 424void lttng_enabler_link_bytecode(const struct lttng_ust_event_desc *event_desc,
daacdbfc 425 struct lttng_ust_ctx **ctx,
621c07fc
FD
426 struct cds_list_head *instance_bytecode_runtime_head,
427 struct cds_list_head *enabler_bytecode_runtime_head);
d871c65b 428
d8d2416d
FD
429/*
430 * Allocate and initialize a `struct lttng_event_notifier_group` object.
431 *
432 * On success, returns a `struct lttng_triggre_group`,
433 * on memory error, returns NULL.
434 */
ddabe860 435__attribute__((visibility("hidden")))
d8d2416d
FD
436struct lttng_event_notifier_group *lttng_event_notifier_group_create(void);
437
438/*
439 * Destroy a `struct lttng_event_notifier_group` object.
440 */
ddabe860 441__attribute__((visibility("hidden")))
d8d2416d
FD
442void lttng_event_notifier_group_destroy(
443 struct lttng_event_notifier_group *event_notifier_group);
444
445/*
446 * Allocate and initialize a `struct lttng_event_notifier_enabler` object.
447 *
448 * On success, returns a `struct lttng_event_notifier_enabler`,
449 * On memory error, returns NULL.
450 */
ddabe860 451__attribute__((visibility("hidden")))
d8d2416d
FD
452struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
453 struct lttng_event_notifier_group *event_notifier_group,
454 enum lttng_enabler_format_type format_type,
fd17d7ce 455 struct lttng_ust_abi_event_notifier *event_notifier_param);
d8d2416d
FD
456
457/*
458 * Destroy a `struct lttng_event_notifier_enabler` object.
459 */
ddabe860 460__attribute__((visibility("hidden")))
d8d2416d
FD
461void lttng_event_notifier_enabler_destroy(
462 struct lttng_event_notifier_enabler *event_notifier_enabler);
463
464/*
465 * Enable a `struct lttng_event_notifier_enabler` object and all event
466 * notifiers related to this enabler.
467 */
ddabe860 468__attribute__((visibility("hidden")))
d8d2416d
FD
469int lttng_event_notifier_enabler_enable(
470 struct lttng_event_notifier_enabler *event_notifier_enabler);
471
472/*
473 * Disable a `struct lttng_event_notifier_enabler` object and all event
474 * notifiers related to this enabler.
475 */
ddabe860 476__attribute__((visibility("hidden")))
d8d2416d
FD
477int lttng_event_notifier_enabler_disable(
478 struct lttng_event_notifier_enabler *event_notifier_enabler);
479
480/*
481 * Attach filter bytecode program to `struct lttng_event_notifier_enabler` and
482 * all event notifiers related to this enabler.
483 */
ddabe860 484__attribute__((visibility("hidden")))
a56fd376 485int lttng_event_notifier_enabler_attach_filter_bytecode(
d8d2416d 486 struct lttng_event_notifier_enabler *event_notifier_enabler,
ab89263e 487 struct lttng_ust_bytecode_node **bytecode);
d8d2416d 488
d37ecb3f
FD
489/*
490 * Attach capture bytecode program to `struct lttng_event_notifier_enabler` and
491 * all event_notifiers related to this enabler.
492 */
ddabe860 493__attribute__((visibility("hidden")))
d37ecb3f
FD
494int lttng_event_notifier_enabler_attach_capture_bytecode(
495 struct lttng_event_notifier_enabler *event_notifier_enabler,
49cde654 496 struct lttng_ust_bytecode_node **bytecode);
d37ecb3f 497
d8d2416d
FD
498/*
499 * Attach exclusion list to `struct lttng_event_notifier_enabler` and all
500 * event notifiers related to this enabler.
501 */
ddabe860 502__attribute__((visibility("hidden")))
d8d2416d
FD
503int lttng_event_notifier_enabler_attach_exclusion(
504 struct lttng_event_notifier_enabler *event_notifier_enabler,
e9fe6aad 505 struct lttng_ust_excluder_node **excluder);
d8d2416d 506
ddabe860 507__attribute__((visibility("hidden")))
b1f720f0 508void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event);
d8d2416d
FD
509
510/*
511 * Connect the probe on all enablers matching this event description.
512 * Called on library load.
513 */
ddabe860 514__attribute__((visibility("hidden")))
d8d2416d
FD
515int lttng_fix_pending_event_notifiers(void);
516
ddabe860 517__attribute__((visibility("hidden")))
67d4e8f5
MJ
518struct lttng_counter *lttng_ust_counter_create(
519 const char *counter_transport_name,
520 size_t number_dimensions, const struct lttng_counter_dimension *dimensions);
521
bd8c1787
MJ
522#ifdef HAVE_PERF_EVENT
523
ddabe860 524__attribute__((visibility("hidden")))
bd8c1787
MJ
525int lttng_add_perf_counter_to_ctx(uint32_t type,
526 uint64_t config,
527 const char *name,
daacdbfc 528 struct lttng_ust_ctx **ctx);
ddabe860
MJ
529
530__attribute__((visibility("hidden")))
bd8c1787 531int lttng_perf_counter_init(void);
ddabe860
MJ
532
533__attribute__((visibility("hidden")))
bd8c1787
MJ
534void lttng_perf_counter_exit(void);
535
536#else /* #ifdef HAVE_PERF_EVENT */
537
538static inline
539int lttng_add_perf_counter_to_ctx(uint32_t type,
540 uint64_t config,
541 const char *name,
daacdbfc 542 struct lttng_ust_ctx **ctx)
bd8c1787
MJ
543{
544 return -ENOSYS;
545}
546static inline
547int lttng_perf_counter_init(void)
548{
549 return 0;
550}
551static inline
552void lttng_perf_counter_exit(void)
553{
554}
555#endif /* #else #ifdef HAVE_PERF_EVENT */
556
ddabe860 557__attribute__((visibility("hidden")))
7753d283 558int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list);
ddabe860
MJ
559
560__attribute__((visibility("hidden")))
7753d283
MJ
561void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list);
562
ddabe860 563__attribute__((visibility("hidden")))
7753d283 564int lttng_probes_get_field_list(struct lttng_ust_field_list *list);
ddabe860
MJ
565
566__attribute__((visibility("hidden")))
7753d283
MJ
567void lttng_probes_prune_field_list(struct lttng_ust_field_list *list);
568
ddabe860 569__attribute__((visibility("hidden")))
fd17d7ce 570struct lttng_ust_abi_tracepoint_iter *
7753d283 571 lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list);
ddabe860
MJ
572
573__attribute__((visibility("hidden")))
fd17d7ce 574struct lttng_ust_abi_field_iter *
7753d283
MJ
575 lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list);
576
ddabe860 577__attribute__((visibility("hidden")))
f69fe5fb 578struct lttng_ust_session *lttng_session_create(void);
ddabe860
MJ
579
580__attribute__((visibility("hidden")))
f69fe5fb 581int lttng_session_enable(struct lttng_ust_session *session);
ddabe860
MJ
582
583__attribute__((visibility("hidden")))
f69fe5fb 584int lttng_session_disable(struct lttng_ust_session *session);
ddabe860
MJ
585
586__attribute__((visibility("hidden")))
f69fe5fb 587int lttng_session_statedump(struct lttng_ust_session *session);
ddabe860
MJ
588
589__attribute__((visibility("hidden")))
f69fe5fb 590void lttng_session_destroy(struct lttng_ust_session *session);
7753d283 591
a5ae46cc
MJ
592/*
593 * Called with ust lock held.
594 */
595__attribute__((visibility("hidden")))
596int lttng_session_active(void);
597
ddabe860 598__attribute__((visibility("hidden")))
7753d283
MJ
599struct cds_list_head *lttng_get_sessions(void);
600
ddabe860 601__attribute__((visibility("hidden")))
7753d283
MJ
602void lttng_handle_pending_statedump(void *owner);
603
ddabe860 604__attribute__((visibility("hidden")))
f69fe5fb 605struct lttng_channel *lttng_channel_create(struct lttng_ust_session *session,
7753d283
MJ
606 const char *transport_name,
607 void *buf_addr,
608 size_t subbuf_size, size_t num_subbuf,
609 unsigned int switch_timer_interval,
610 unsigned int read_timer_interval,
611 int **shm_fd, int **wait_fd,
612 uint64_t **memory_map_size,
613 struct lttng_channel *chan_priv_init);
614
ddabe860 615__attribute__((visibility("hidden")))
7753d283 616int lttng_channel_enable(struct lttng_channel *channel);
ddabe860
MJ
617
618__attribute__((visibility("hidden")))
7753d283
MJ
619int lttng_channel_disable(struct lttng_channel *channel);
620
ddabe860 621__attribute__((visibility("hidden")))
7753d283 622void lttng_transport_register(struct lttng_transport *transport);
ddabe860
MJ
623
624__attribute__((visibility("hidden")))
7753d283
MJ
625void lttng_transport_unregister(struct lttng_transport *transport);
626
65c48d6a
MJ
627/* This is ABI between liblttng-ust and liblttng-ust-ctl */
628struct lttng_transport *lttng_ust_transport_find(const char *name);
629
cbba5e04
MJ
630/* This is ABI between liblttng-ust and liblttng-ust-dl */
631void lttng_ust_dl_update(void *ip);
632
ddabe860 633__attribute__((visibility("hidden")))
dc11f93f 634void lttng_probe_provider_unregister_events(struct lttng_ust_probe_desc *desc);
7753d283 635
ddabe860 636__attribute__((visibility("hidden")))
7753d283
MJ
637int lttng_fix_pending_events(void);
638
ddabe860 639__attribute__((visibility("hidden")))
7753d283
MJ
640struct cds_list_head *lttng_get_probe_list_head(void);
641
ddabe860 642__attribute__((visibility("hidden")))
f69fe5fb 643struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session,
891d6b55 644 const struct lttng_ust_enum_desc *enum_desc);
7753d283 645
ddabe860 646__attribute__((visibility("hidden")))
fd17d7ce
MD
647int lttng_abi_create_root_handle(void);
648
ddabe860 649__attribute__((visibility("hidden")))
fd17d7ce 650const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id);
ddabe860
MJ
651
652__attribute__((visibility("hidden")))
fd17d7ce 653int lttng_ust_abi_objd_unref(int id, int is_owner);
ddabe860
MJ
654
655__attribute__((visibility("hidden")))
fd17d7ce 656void lttng_ust_abi_exit(void);
ddabe860
MJ
657
658__attribute__((visibility("hidden")))
fd17d7ce 659void lttng_ust_abi_events_exit(void);
ddabe860
MJ
660
661__attribute__((visibility("hidden")))
fd17d7ce
MD
662void lttng_ust_abi_objd_table_owner_cleanup(void *owner);
663
d871c65b 664#endif /* _LTTNG_UST_EVENTS_INTERNAL_H */
This page took 0.056598 seconds and 4 git commands to generate.