Split ust-events-internal.h between common and liblttng-ust
authorMichael Jeanson <mjeanson@efficios.com>
Sat, 3 Apr 2021 00:22:42 +0000 (20:22 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 13 Apr 2021 18:49:42 +0000 (14:49 -0400)
Split ust-events-internal.h into a common private header containing the
types and ABI functions and a header internal to liblttng-ust containing
the declaration of the private symbols.

Change-Id: I8ec2a5c8aad9ba85557b5a727ffc3615172e375d
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
26 files changed:
src/common/Makefile.am
src/common/events.h [new file with mode: 0644]
src/common/ustcomm.c
src/lib/lttng-ust-ctl/ustctl.c
src/lib/lttng-ust-dl/lttng-ust-dl.c
src/lib/lttng-ust/Makefile.am
src/lib/lttng-ust/context-internal.h
src/lib/lttng-ust/event-notifier-notification.c
src/lib/lttng-ust/events.h [new file with mode: 0644]
src/lib/lttng-ust/lttng-bytecode-interpreter.c
src/lib/lttng-ust/lttng-bytecode-specialize.c
src/lib/lttng-ust/lttng-bytecode-validator.c
src/lib/lttng-ust/lttng-bytecode.c
src/lib/lttng-ust/lttng-bytecode.h
src/lib/lttng-ust/lttng-context-perf-counters.c
src/lib/lttng-ust/lttng-counter-client-percpu-32-modular.c
src/lib/lttng-ust/lttng-counter-client-percpu-64-modular.c
src/lib/lttng-ust/lttng-events.c
src/lib/lttng-ust/lttng-probes.c
src/lib/lttng-ust/lttng-ring-buffer-client-template.h
src/lib/lttng-ust/lttng-ring-buffer-metadata-client-template.h
src/lib/lttng-ust/lttng-ust-abi.c
src/lib/lttng-ust/lttng-ust-comm.c
src/lib/lttng-ust/lttng-ust-statedump.c
src/lib/lttng-ust/ust-core.c
src/lib/lttng-ust/ust-events-internal.h [deleted file]

index e75ee2509e44c0c657bcc373016a18f61849051b..e450f8c858876fd617b6344ab122626d7c75e821 100644 (file)
@@ -13,6 +13,7 @@ noinst_HEADERS = \
        clock.h \
        dynamic-type.h \
        elf.h \
+       events.h \
        logging.h \
        macros.h \
        patient.h \
diff --git a/src/common/events.h b/src/common/events.h
new file mode 100644 (file)
index 0000000..b3e11bb
--- /dev/null
@@ -0,0 +1,581 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright 2019 (c) Francis Deslauriers <francis.deslauriers@efficios.com>
+ */
+
+#ifndef _UST_COMMON_UST_EVENTS_H
+#define _UST_COMMON_UST_EVENTS_H
+
+#include <limits.h>
+#include <stdint.h>
+
+#include <urcu/list.h>
+#include <urcu/hlist.h>
+
+#include <lttng/ust-events.h>
+
+#include "common/macros.h"
+#include "common/ust-context-provider.h"
+
+struct lttng_ust_abi_obj;
+struct lttng_event_notifier_group;
+
+union lttng_ust_abi_args {
+       struct {
+               void *chan_data;
+               int wakeup_fd;
+       } channel;
+       struct {
+               int shm_fd;
+               int wakeup_fd;
+       } stream;
+       struct {
+               struct lttng_ust_abi_field_iter entry;
+       } field_list;
+       struct {
+               char *ctxname;
+       } app_context;
+       struct {
+               int event_notifier_notif_fd;
+       } event_notifier_handle;
+       struct {
+               void *counter_data;
+       } counter;
+       struct {
+               int shm_fd;
+       } counter_shm;
+};
+
+struct lttng_ust_abi_objd_ops {
+       long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
+               union lttng_ust_abi_args *args, void *owner);
+       int (*release)(int objd);
+};
+
+enum lttng_enabler_format_type {
+       LTTNG_ENABLER_FORMAT_STAR_GLOB,
+       LTTNG_ENABLER_FORMAT_EVENT,
+};
+
+/*
+ * Enabler field, within whatever object is enabling an event. Target of
+ * backward reference.
+ */
+struct lttng_enabler {
+       enum lttng_enabler_format_type format_type;
+
+       /* head list of struct lttng_ust_filter_bytecode_node */
+       struct cds_list_head filter_bytecode_head;
+       /* head list of struct lttng_ust_excluder_node */
+       struct cds_list_head excluder_head;
+
+       struct lttng_ust_abi_event event_param;
+       unsigned int enabled:1;
+};
+
+struct lttng_event_enabler {
+       struct lttng_enabler base;
+       struct cds_list_head node;      /* per-session list of enablers */
+       struct lttng_ust_channel_buffer *chan;
+       /*
+        * Unused, but kept around to make it explicit that the tracer can do
+        * it.
+        */
+       struct lttng_ust_ctx *ctx;
+};
+
+struct lttng_event_notifier_enabler {
+       struct lttng_enabler base;
+       uint64_t error_counter_index;
+       struct cds_list_head node;      /* per-app list of event_notifier enablers */
+       struct cds_list_head capture_bytecode_head;
+       struct lttng_event_notifier_group *group; /* weak ref */
+       uint64_t user_token;            /* User-provided token */
+       uint64_t num_captures;
+};
+
+enum lttng_ust_bytecode_type {
+       LTTNG_UST_BYTECODE_TYPE_FILTER,
+       LTTNG_UST_BYTECODE_TYPE_CAPTURE,
+};
+
+struct lttng_ust_bytecode_node {
+       enum lttng_ust_bytecode_type type;
+       struct cds_list_head node;
+       struct lttng_enabler *enabler;
+       struct  {
+               uint32_t len;
+               uint32_t reloc_offset;
+               uint64_t seqnum;
+               char data[];
+       } bc;
+};
+
+/*
+ * Bytecode interpreter return value.
+ */
+enum lttng_ust_bytecode_interpreter_ret {
+       LTTNG_UST_BYTECODE_INTERPRETER_ERROR = -1,
+       LTTNG_UST_BYTECODE_INTERPRETER_OK = 0,
+};
+
+struct lttng_interpreter_output;
+struct lttng_ust_bytecode_runtime_private;
+
+enum lttng_ust_bytecode_filter_result {
+       LTTNG_UST_BYTECODE_FILTER_ACCEPT = 0,
+       LTTNG_UST_BYTECODE_FILTER_REJECT = 1,
+};
+
+struct lttng_ust_bytecode_filter_ctx {
+       enum lttng_ust_bytecode_filter_result result;
+};
+
+struct lttng_ust_excluder_node {
+       struct cds_list_head node;
+       struct lttng_enabler *enabler;
+       /*
+        * struct lttng_ust_event_exclusion had variable sized array,
+        * must be last field.
+        */
+       struct lttng_ust_abi_event_exclusion excluder;
+};
+
+/* Data structures used by the tracer. */
+
+struct tp_list_entry {
+       struct lttng_ust_abi_tracepoint_iter tp;
+       struct cds_list_head head;
+};
+
+struct lttng_ust_tracepoint_list {
+       struct tp_list_entry *iter;
+       struct cds_list_head head;
+};
+
+struct tp_field_list_entry {
+       struct lttng_ust_abi_field_iter field;
+       struct cds_list_head head;
+};
+
+struct lttng_ust_field_list {
+       struct tp_field_list_entry *iter;
+       struct cds_list_head head;
+};
+
+/*
+ * Objects in a linked-list of enablers, owned by an event or event_notifier.
+ * This is used because an event (or a event_notifier) can be enabled by more
+ * than one enabler and we want a quick way to iterate over all enablers of an
+ * object.
+ *
+ * For example, event rules "my_app:a*" and "my_app:ab*" will both match the
+ * event with the name "my_app:abc".
+ */
+struct lttng_enabler_ref {
+       struct cds_list_head node;              /* enabler ref list */
+       struct lttng_enabler *ref;              /* backward ref */
+};
+
+#define LTTNG_COUNTER_DIMENSION_MAX    8
+struct lttng_counter_dimension {
+       uint64_t size;
+       uint64_t underflow_index;
+       uint64_t overflow_index;
+       uint8_t has_underflow;
+       uint8_t has_overflow;
+};
+
+struct lttng_counter_ops {
+       struct lib_counter *(*counter_create)(size_t nr_dimensions,
+                       const struct lttng_counter_dimension *dimensions,
+                       int64_t global_sum_step,
+                       int global_counter_fd,
+                       int nr_counter_cpu_fds,
+                       const int *counter_cpu_fds,
+                       bool is_daemon);
+       void (*counter_destroy)(struct lib_counter *counter);
+       int (*counter_add)(struct lib_counter *counter,
+                       const size_t *dimension_indexes, int64_t v);
+       int (*counter_read)(struct lib_counter *counter,
+                       const size_t *dimension_indexes, int cpu,
+                       int64_t *value, bool *overflow, bool *underflow);
+       int (*counter_aggregate)(struct lib_counter *counter,
+                       const size_t *dimension_indexes, int64_t *value,
+                       bool *overflow, bool *underflow);
+       int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes);
+};
+
+struct lttng_counter {
+       int objd;
+       struct lttng_event_notifier_group *event_notifier_group;    /* owner */
+       struct lttng_counter_transport *transport;
+       struct lib_counter *counter;
+       struct lttng_counter_ops *ops;
+};
+
+#define LTTNG_UST_EVENT_HT_BITS                12
+#define LTTNG_UST_EVENT_HT_SIZE                (1U << LTTNG_UST_EVENT_HT_BITS)
+
+struct lttng_ust_event_ht {
+       struct cds_hlist_head table[LTTNG_UST_EVENT_HT_SIZE];
+};
+
+#define LTTNG_UST_EVENT_NOTIFIER_HT_BITS               12
+#define LTTNG_UST_EVENT_NOTIFIER_HT_SIZE               (1U << LTTNG_UST_EVENT_NOTIFIER_HT_BITS)
+struct lttng_ust_event_notifier_ht {
+       struct cds_hlist_head table[LTTNG_UST_EVENT_NOTIFIER_HT_SIZE];
+};
+
+#define LTTNG_UST_ENUM_HT_BITS         12
+#define LTTNG_UST_ENUM_HT_SIZE         (1U << LTTNG_UST_ENUM_HT_BITS)
+
+struct lttng_ust_enum_ht {
+       struct cds_hlist_head table[LTTNG_UST_ENUM_HT_SIZE];
+};
+
+struct lttng_event_notifier_group {
+       int objd;
+       void *owner;
+       int notification_fd;
+       struct cds_list_head node;              /* Event notifier group handle list */
+       struct cds_list_head enablers_head;
+       struct cds_list_head event_notifiers_head; /* list of event_notifiers */
+       struct lttng_ust_event_notifier_ht event_notifiers_ht; /* hashtable of event_notifiers */
+       struct lttng_ust_ctx *ctx;              /* contexts for filters. */
+
+       struct lttng_counter *error_counter;
+       size_t error_counter_len;
+};
+
+struct lttng_transport {
+       const char *name;
+       struct cds_list_head node;
+       struct lttng_ust_channel_buffer_ops ops;
+       const struct lttng_ust_lib_ring_buffer_config *client_config;
+};
+
+struct lttng_counter_transport {
+       const char *name;
+       struct cds_list_head node;
+       struct lttng_counter_ops ops;
+       const struct lib_counter_config *client_config;
+};
+
+struct lttng_ust_event_common_private {
+       struct lttng_ust_event_common *pub;     /* Public event interface */
+
+       const struct lttng_ust_event_desc *desc;
+       /* Backward references: list of lttng_enabler_ref (ref to enablers) */
+       struct cds_list_head enablers_ref_head;
+       int registered;                         /* has reg'd tracepoint probe */
+       uint64_t user_token;
+
+       int has_enablers_without_filter_bytecode;
+       /* list of struct lttng_ust_bytecode_runtime, sorted by seqnum */
+       struct cds_list_head filter_bytecode_runtime_head;
+};
+
+struct lttng_ust_event_recorder_private {
+       struct lttng_ust_event_common_private parent;
+
+       struct lttng_ust_event_recorder *pub;   /* Public event interface */
+       struct cds_list_head node;              /* Event recorder list */
+       struct cds_hlist_node hlist;            /* Hash table of event recorders */
+       struct lttng_ust_ctx *ctx;
+       unsigned int id;
+};
+
+struct lttng_ust_event_notifier_private {
+       struct lttng_ust_event_common_private parent;
+
+       struct lttng_ust_event_notifier *pub;   /* Public event notifier interface */
+       struct lttng_event_notifier_group *group; /* weak ref */
+       size_t num_captures;                    /* Needed to allocate the msgpack array. */
+       uint64_t error_counter_index;
+       struct cds_list_head node;              /* Event notifier list */
+       struct cds_hlist_node hlist;            /* Hash table of event notifiers */
+       struct cds_list_head capture_bytecode_runtime_head;
+};
+
+struct lttng_ust_bytecode_runtime {
+       enum lttng_ust_bytecode_type type;
+       struct lttng_ust_bytecode_node *bc;
+       int link_failed;
+       int (*interpreter_func)(struct lttng_ust_bytecode_runtime *bytecode_runtime,
+                       const char *interpreter_stack_data,
+                       void *ctx);
+       struct cds_list_head node;              /* list of bytecode runtime in event */
+       /*
+        * Pointer to a URCU-protected pointer owned by an `struct
+        * lttng_session`or `struct lttng_event_notifier_group`.
+        */
+       struct lttng_ust_ctx **pctx;
+};
+
+struct lttng_ust_session_private {
+       struct lttng_ust_session *pub;          /* Public session interface */
+
+       int been_active;                        /* Been active ? */
+       int objd;                               /* Object associated */
+       struct cds_list_head chan_head;         /* Channel list head */
+       struct cds_list_head events_head;       /* list of events */
+       struct cds_list_head node;              /* Session list */
+
+       /* List of enablers */
+       struct cds_list_head enablers_head;
+       struct lttng_ust_event_ht events_ht;    /* ht of events */
+       void *owner;                            /* object owner */
+       int tstate:1;                           /* Transient enable state */
+
+       int statedump_pending:1;
+
+       struct lttng_ust_enum_ht enums_ht;      /* ht of enumerations */
+       struct cds_list_head enums_head;
+       struct lttng_ust_ctx *ctx;              /* contexts for filters. */
+
+       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
+       bool uuid_set;                          /* Is uuid set ? */
+};
+
+struct lttng_enum {
+       const struct lttng_ust_enum_desc *desc;
+       struct lttng_ust_session *session;
+       struct cds_list_head node;              /* Enum list in session */
+       struct cds_hlist_node hlist;            /* Session ht of enums */
+       uint64_t id;                            /* Enumeration ID in sessiond */
+};
+
+struct lttng_ust_shm_handle;
+
+struct lttng_ust_channel_buffer_ops_private {
+       struct lttng_ust_channel_buffer_ops *pub;       /* Public channel buffer ops interface */
+
+       struct lttng_ust_channel_buffer *(*channel_create)(const char *name,
+                       void *buf_addr,
+                       size_t subbuf_size, size_t num_subbuf,
+                       unsigned int switch_timer_interval,
+                       unsigned int read_timer_interval,
+                       unsigned char *uuid,
+                       uint32_t chan_id,
+                       const int *stream_fds, int nr_stream_fds,
+                       int64_t blocking_timeout);
+       void (*channel_destroy)(struct lttng_ust_channel_buffer *chan);
+       /*
+        * packet_avail_size returns the available size in the current
+        * packet. Note that the size returned is only a hint, since it
+        * may change due to concurrent writes.
+        */
+       size_t (*packet_avail_size)(struct lttng_ust_channel_buffer *chan);
+       int (*is_finalized)(struct lttng_ust_channel_buffer *chan);
+       int (*is_disabled)(struct lttng_ust_channel_buffer *chan);
+       int (*flush_buffer)(struct lttng_ust_channel_buffer *chan);
+};
+
+struct lttng_ust_channel_common_private {
+       struct lttng_ust_channel_common *pub;   /* Public channel interface */
+
+       int objd;                               /* Object associated with channel. */
+       int tstate:1;                           /* Transient enable state */
+};
+
+struct lttng_ust_channel_buffer_private {
+       struct lttng_ust_channel_common_private parent;
+
+       struct lttng_ust_channel_buffer *pub;   /* Public channel buffer interface */
+       struct cds_list_head node;              /* Channel list in session */
+       int header_type;                        /* 0: unset, 1: compact, 2: large */
+       unsigned int id;                        /* Channel ID */
+       enum lttng_ust_abi_chan_type type;
+       struct lttng_ust_ctx *ctx;
+       struct lttng_ust_lib_ring_buffer_channel *rb_chan;      /* Ring buffer channel */
+       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
+};
+
+/*
+ * IMPORTANT: this structure is part of the ABI between the consumer
+ * daemon and the UST library within traced applications. Changing it
+ * breaks the UST communication protocol.
+ *
+ * TODO: remove unused fields on next UST communication protocol
+ * breaking update.
+ */
+struct lttng_ust_abi_channel_config {
+       void *unused1;
+       int unused2;
+       void *unused3;
+       void *unused4;
+       int unused5;
+       struct cds_list_head unused6;
+       void *unused7;
+       int unused8;
+       void *unused9;
+
+       /* Channel ID */
+       unsigned int id;
+       enum lttng_ust_abi_chan_type unused10;
+       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
+       int unused11:1;
+};
+
+/* Global (filter), event and channel contexts. */
+struct lttng_ust_ctx {
+       struct lttng_ust_ctx_field *fields;
+       unsigned int nr_fields;
+       unsigned int allocated_fields;
+       unsigned int largest_align;
+};
+
+struct lttng_ust_registered_probe {
+       const struct lttng_ust_probe_desc *desc;
+
+       struct cds_list_head head;              /* chain registered probes */
+       struct cds_list_head lazy_init_head;
+       int lazy;                               /* lazy registration */
+};
+
+/*
+ * Context field
+ */
+
+struct lttng_ust_ctx_field {
+       const struct lttng_ust_event_field *event_field;
+       size_t (*get_size)(void *priv, size_t offset);
+       void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
+                      struct lttng_ust_channel_buffer *chan);
+       void (*get_value)(void *priv, struct lttng_ust_ctx_value *value);
+       void (*destroy)(void *priv);
+       void *priv;
+};
+
+static inline
+const struct lttng_ust_type_integer *lttng_ust_get_type_integer(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_integer)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_integer, parent);
+}
+
+static inline
+const struct lttng_ust_type_float *lttng_ust_get_type_float(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_float)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_float, parent);
+}
+
+static inline
+const struct lttng_ust_type_string *lttng_ust_get_type_string(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_string)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_string, parent);
+}
+
+static inline
+const struct lttng_ust_type_enum *lttng_ust_get_type_enum(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_enum)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_enum, parent);
+}
+
+static inline
+const struct lttng_ust_type_array *lttng_ust_get_type_array(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_array)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_array, parent);
+}
+
+static inline
+const struct lttng_ust_type_sequence *lttng_ust_get_type_sequence(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_sequence)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_sequence, parent);
+}
+
+static inline
+const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng_ust_type_common *type)
+{
+       if (type->type != lttng_ust_type_struct)
+               return NULL;
+       return caa_container_of(type, const struct lttng_ust_type_struct, parent);
+}
+
+#define lttng_ust_static_type_integer(_size, _alignment, _signedness, _byte_order, _base)              \
+       ((const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_integer, { \
+               .parent = {                                                                             \
+                       .type = lttng_ust_type_integer,                                                 \
+               },                                                                                      \
+               .struct_size = sizeof(struct lttng_ust_type_integer),                                   \
+               .size = (_size),                                                                        \
+               .alignment = (_alignment),                                                              \
+               .signedness = (_signedness),                                                            \
+               .reverse_byte_order = (_byte_order) != BYTE_ORDER,                                      \
+               .base = (_base),                                                                        \
+       }))
+
+#define lttng_ust_static_type_array_text(_length)                                                      \
+       ((const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \
+               .parent = {                                                                             \
+                       .type = lttng_ust_type_array,                                                   \
+               },                                                                                      \
+               .struct_size = sizeof(struct lttng_ust_type_array),                                     \
+               .length = (_length),                                                                    \
+               .alignment = 0,                                                                         \
+               .encoding = lttng_ust_string_encoding_UTF8,                                             \
+               .elem_type = lttng_ust_static_type_integer(sizeof(char) * CHAR_BIT,                     \
+                               lttng_ust_rb_alignof(char) * CHAR_BIT, lttng_ust_is_signed_type(char),  \
+                               BYTE_ORDER, 10),                                                        \
+       }))
+
+#define lttng_ust_static_event_field(_name, _type, _nowrite, _nofilter)                                        \
+       __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, {                                  \
+               .struct_size = sizeof(struct lttng_ust_event_field),                                    \
+               .name = (_name),                                                                        \
+               .type = (_type),                                                                        \
+               .nowrite = (_nowrite),                                                                  \
+               .nofilter = (_nofilter),                                                                \
+       })
+
+#define lttng_ust_static_ctx_field(_event_field, _get_size, _record, _get_value, _destroy, _priv)      \
+       __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_ctx_field, {                                    \
+               .event_field = (_event_field),                                                          \
+               .get_size = (_get_size),                                                                \
+               .record = (_record),                                                                    \
+               .get_value = (_get_value),                                                              \
+               .destroy = (_destroy),                                                                  \
+               .priv = (_priv),                                                                        \
+       })
+
+static inline
+struct lttng_enabler *lttng_event_enabler_as_enabler(
+               struct lttng_event_enabler *event_enabler)
+{
+       return &event_enabler->base;
+}
+
+static inline
+struct lttng_enabler *lttng_event_notifier_enabler_as_enabler(
+               struct lttng_event_notifier_enabler *event_notifier_enabler)
+{
+       return &event_notifier_enabler->base;
+}
+
+
+
+/* This is ABI between liblttng-ust and liblttng-ust-ctl */
+struct lttng_transport *lttng_ust_transport_find(const char *name);
+
+/* This is ABI between liblttng-ust and liblttng-ust-dl */
+void lttng_ust_dl_update(void *ip);
+
+struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session,
+               const struct lttng_ust_enum_desc *enum_desc)
+       __attribute__((visibility("hidden")));
+
+
+#endif /* _UST_COMMON_UST_EVENTS_H */
index d65889926c5114d9a32bc548f7e081fb7e1f5f94..80346ce1b39dbd31a74cab4e9d999d65ecadc170 100644 (file)
@@ -27,7 +27,7 @@
 #include "common/dynamic-type.h"
 #include "common/logging.h"
 
-#include "lib/lttng-ust/ust-events-internal.h"
+#include "common/events.h"
 #include "common/compat/pthread.h"
 
 #define USTCOMM_CODE_OFFSET(code)      \
index 96107fe743bb31dba8cb2ec499347e7ed427b61d..7c169fe16c7a24b4578d994de12ceb44bc776917 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "common/ringbuffer/backend.h"
 #include "common/ringbuffer/frontend.h"
-#include "lib/lttng-ust/ust-events-internal.h"
+#include "common/events.h"
 #include "common/wait.h"
 #include "lib/lttng-ust/lttng-rb-clients.h"
 #include "common/clock.h"
index 42e8ec3c02722a95ee142ee501579b9e25d20f15..2b767e4760e95593518c0ba46a3de1e9aac7068e 100644 (file)
@@ -21,8 +21,7 @@
 #include <lttng/ust-events.h>
 #include "common/macros.h"
 #include "common/logging.h"
-
-#include "lib/lttng-ust/ust-events-internal.h"
+#include "common/events.h"
 
 /* Include link.h last else it conflicts with ust-dlfcn. */
 #include <link.h>
index 51a18352d53e12700106df4ab3355ad73908f9ab..77c91067693e3a94de27c36b2070def9b1a3bd02 100644 (file)
@@ -78,7 +78,7 @@ liblttng_ust_runtime_la_SOURCES = \
        context-internal.h \
        context-provider-internal.h \
        tracepoint-internal.h \
-       ust-events-internal.h \
+       events.h \
        clock.h \
        jhash.h \
        lttng-ust-uuid.h \
index 87e3bbf50228bddd9e20c132fdd8853aaf519e36..874b6d739b9c7ed1b65d09ef512a6d46031a744d 100644 (file)
@@ -8,7 +8,7 @@
 #define _LTTNG_UST_CONTEXT_INTERNAL_H
 
 #include <lttng/ust-events.h>
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/ust-context-provider.h"
 
 int lttng_context_init_all(struct lttng_ust_ctx **ctx)
index 32886fdb3a9d9fe19d81fec92dbbb75c8150326f..4cfd1b15ceaa087ffda3bb7727e819a1d1cf62d1 100644 (file)
@@ -15,7 +15,7 @@
 #include <urcu/rculist.h>
 
 #include "lttng-tracer-core.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/msgpack/msgpack.h"
 #include "lttng-bytecode.h"
 #include "common/patient.h"
diff --git a/src/lib/lttng-ust/events.h b/src/lib/lttng-ust/events.h
new file mode 100644 (file)
index 0000000..9e28b4c
--- /dev/null
@@ -0,0 +1,339 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright 2019 (c) Francis Deslauriers <francis.deslauriers@efficios.com>
+ */
+
+#ifndef _LTTNG_UST_EVENTS_INTERNAL_H
+#define _LTTNG_UST_EVENTS_INTERNAL_H
+
+#include "common/events.h"
+
+/*
+ * Allocate and initialize a `struct lttng_event_enabler` object.
+ *
+ * On success, returns a `struct lttng_event_enabler`,
+ * On memory error, returns NULL.
+ */
+struct lttng_event_enabler *lttng_event_enabler_create(
+               enum lttng_enabler_format_type format_type,
+               struct lttng_ust_abi_event *event_param,
+               struct lttng_ust_channel_buffer *chan)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Destroy a `struct lttng_event_enabler` object.
+ */
+void lttng_event_enabler_destroy(struct lttng_event_enabler *enabler)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Enable a `struct lttng_event_enabler` object and all events related to this
+ * enabler.
+ */
+int lttng_event_enabler_enable(struct lttng_event_enabler *enabler)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Disable a `struct lttng_event_enabler` object and all events related to this
+ * enabler.
+ */
+int lttng_event_enabler_disable(struct lttng_event_enabler *enabler)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Attach filter bytecode program to `struct lttng_event_enabler` and all
+ * events related to this enabler.
+ */
+int lttng_event_enabler_attach_filter_bytecode(
+               struct lttng_event_enabler *enabler,
+               struct lttng_ust_bytecode_node **bytecode)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Attach an application context to an event enabler.
+ *
+ * Not implemented.
+ */
+int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
+               struct lttng_ust_abi_context *ctx)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Attach exclusion list to `struct lttng_event_enabler` and all
+ * events related to this enabler.
+ */
+int lttng_event_enabler_attach_exclusion(struct lttng_event_enabler *enabler,
+               struct lttng_ust_excluder_node **excluder)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Synchronize bytecodes for the enabler and the instance (event or
+ * event_notifier).
+ *
+ * This function goes over all bytecode programs of the enabler (event or
+ * event_notifier enabler) to ensure each is linked to the provided instance.
+ */
+void lttng_enabler_link_bytecode(const struct lttng_ust_event_desc *event_desc,
+               struct lttng_ust_ctx **ctx,
+               struct cds_list_head *instance_bytecode_runtime_head,
+               struct cds_list_head *enabler_bytecode_runtime_head)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Allocate and initialize a `struct lttng_event_notifier_group` object.
+ *
+ * On success, returns a `struct lttng_triggre_group`,
+ * on memory error, returns NULL.
+ */
+struct lttng_event_notifier_group *lttng_event_notifier_group_create(void)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Destroy a `struct lttng_event_notifier_group` object.
+ */
+void lttng_event_notifier_group_destroy(
+               struct lttng_event_notifier_group *event_notifier_group)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Allocate and initialize a `struct lttng_event_notifier_enabler` object.
+ *
+ * On success, returns a `struct lttng_event_notifier_enabler`,
+ * On memory error, returns NULL.
+ */
+struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
+               struct lttng_event_notifier_group *event_notifier_group,
+               enum lttng_enabler_format_type format_type,
+               struct lttng_ust_abi_event_notifier *event_notifier_param)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Destroy a `struct lttng_event_notifier_enabler` object.
+ */
+void lttng_event_notifier_enabler_destroy(
+               struct lttng_event_notifier_enabler *event_notifier_enabler)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Enable a `struct lttng_event_notifier_enabler` object and all event
+ * notifiers related to this enabler.
+ */
+int lttng_event_notifier_enabler_enable(
+               struct lttng_event_notifier_enabler *event_notifier_enabler)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Disable a `struct lttng_event_notifier_enabler` object and all event
+ * notifiers related to this enabler.
+ */
+int lttng_event_notifier_enabler_disable(
+               struct lttng_event_notifier_enabler *event_notifier_enabler)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Attach filter bytecode program to `struct lttng_event_notifier_enabler` and
+ * all event notifiers related to this enabler.
+ */
+int lttng_event_notifier_enabler_attach_filter_bytecode(
+               struct lttng_event_notifier_enabler *event_notifier_enabler,
+               struct lttng_ust_bytecode_node **bytecode)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Attach capture bytecode program to `struct lttng_event_notifier_enabler` and
+ * all event_notifiers related to this enabler.
+ */
+int lttng_event_notifier_enabler_attach_capture_bytecode(
+               struct lttng_event_notifier_enabler *event_notifier_enabler,
+               struct lttng_ust_bytecode_node **bytecode)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Attach exclusion list to `struct lttng_event_notifier_enabler` and all
+ * event notifiers related to this enabler.
+ */
+int lttng_event_notifier_enabler_attach_exclusion(
+               struct lttng_event_notifier_enabler *event_notifier_enabler,
+               struct lttng_ust_excluder_node **excluder)
+       __attribute__((visibility("hidden")));
+
+void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Connect the probe on all enablers matching this event description.
+ * Called on library load.
+ */
+int lttng_fix_pending_event_notifiers(void)
+       __attribute__((visibility("hidden")));
+
+struct lttng_counter *lttng_ust_counter_create(
+               const char *counter_transport_name,
+               size_t number_dimensions, const struct lttng_counter_dimension *dimensions)
+       __attribute__((visibility("hidden")));
+
+#ifdef HAVE_LINUX_PERF_EVENT_H
+
+int lttng_add_perf_counter_to_ctx(uint32_t type,
+                                 uint64_t config,
+                                 const char *name,
+                                 struct lttng_ust_ctx **ctx)
+       __attribute__((visibility("hidden")));
+
+int lttng_perf_counter_init(void)
+       __attribute__((visibility("hidden")));
+
+void lttng_perf_counter_exit(void)
+       __attribute__((visibility("hidden")));
+
+#else /* #ifdef HAVE_LINUX_PERF_EVENT_H */
+
+static inline
+int lttng_add_perf_counter_to_ctx(uint32_t type,
+                                 uint64_t config,
+                                 const char *name,
+                                 struct lttng_ust_ctx **ctx)
+{
+       return -ENOSYS;
+}
+static inline
+int lttng_perf_counter_init(void)
+{
+       return 0;
+}
+static inline
+void lttng_perf_counter_exit(void)
+{
+}
+#endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */
+
+int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list)
+       __attribute__((visibility("hidden")));
+
+void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list)
+       __attribute__((visibility("hidden")));
+
+int lttng_probes_get_field_list(struct lttng_ust_field_list *list)
+       __attribute__((visibility("hidden")));
+
+void lttng_probes_prune_field_list(struct lttng_ust_field_list *list)
+       __attribute__((visibility("hidden")));
+
+struct lttng_ust_abi_tracepoint_iter *
+       lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list)
+       __attribute__((visibility("hidden")));
+
+struct lttng_ust_abi_field_iter *
+       lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list)
+       __attribute__((visibility("hidden")));
+
+struct lttng_ust_session *lttng_session_create(void)
+       __attribute__((visibility("hidden")));
+
+int lttng_session_enable(struct lttng_ust_session *session)
+       __attribute__((visibility("hidden")));
+
+int lttng_session_disable(struct lttng_ust_session *session)
+       __attribute__((visibility("hidden")));
+
+int lttng_session_statedump(struct lttng_ust_session *session)
+       __attribute__((visibility("hidden")));
+
+void lttng_session_destroy(struct lttng_ust_session *session)
+       __attribute__((visibility("hidden")));
+
+/*
+ * Called with ust lock held.
+ */
+int lttng_session_active(void)
+       __attribute__((visibility("hidden")));
+
+struct cds_list_head *lttng_get_sessions(void)
+       __attribute__((visibility("hidden")));
+
+void lttng_handle_pending_statedump(void *owner)
+       __attribute__((visibility("hidden")));
+
+int lttng_channel_enable(struct lttng_ust_channel_common *lttng_channel)
+       __attribute__((visibility("hidden")));
+
+int lttng_channel_disable(struct lttng_ust_channel_common *lttng_channel)
+       __attribute__((visibility("hidden")));
+
+void lttng_transport_register(struct lttng_transport *transport)
+       __attribute__((visibility("hidden")));
+
+void lttng_transport_unregister(struct lttng_transport *transport)
+       __attribute__((visibility("hidden")));
+
+void lttng_probe_provider_unregister_events(const struct lttng_ust_probe_desc *desc)
+       __attribute__((visibility("hidden")));
+
+int lttng_fix_pending_events(void)
+       __attribute__((visibility("hidden")));
+
+struct cds_list_head *lttng_get_probe_list_head(void)
+       __attribute__((visibility("hidden")));
+
+int lttng_abi_create_root_handle(void)
+       __attribute__((visibility("hidden")));
+
+const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id)
+       __attribute__((visibility("hidden")));
+
+int lttng_ust_abi_objd_unref(int id, int is_owner)
+       __attribute__((visibility("hidden")));
+
+void lttng_ust_abi_exit(void)
+       __attribute__((visibility("hidden")));
+
+void lttng_ust_abi_events_exit(void)
+       __attribute__((visibility("hidden")));
+
+void lttng_ust_abi_objd_table_owner_cleanup(void *owner)
+       __attribute__((visibility("hidden")));
+
+struct lttng_ust_channel_buffer *lttng_ust_alloc_channel_buffer(void)
+       __attribute__((visibility("hidden")));
+
+void lttng_ust_free_channel_common(struct lttng_ust_channel_common *chan)
+       __attribute__((visibility("hidden")));
+
+int lttng_ust_interpret_event_filter(struct lttng_ust_event_common *event,
+               const char *interpreter_stack_data,
+               void *filter_ctx)
+       __attribute__((visibility("hidden")));
+
+int lttng_ust_session_uuid_validate(struct lttng_ust_session *session,
+               unsigned char *uuid)
+       __attribute__((visibility("hidden")));
+
+bool lttng_ust_validate_event_name(const struct lttng_ust_event_desc *desc)
+       __attribute__((visibility("hidden")));
+
+void lttng_ust_format_event_name(const struct lttng_ust_event_desc *desc,
+               char *name)
+       __attribute__((visibility("hidden")));
+
+int lttng_ust_add_app_context_to_ctx_rcu(const char *name, struct lttng_ust_ctx **ctx)
+       __attribute__((visibility("hidden")));
+
+int lttng_ust_context_set_provider_rcu(struct lttng_ust_ctx **_ctx,
+               const char *name,
+               size_t (*get_size)(void *priv, size_t offset),
+               void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
+                       struct lttng_ust_channel_buffer *chan),
+               void (*get_value)(void *priv, struct lttng_ust_ctx_value *value),
+               void *priv)
+       __attribute__((visibility("hidden")));
+
+void lttng_ust_context_set_session_provider(const char *name,
+               size_t (*get_size)(void *priv, size_t offset),
+               void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
+                       struct lttng_ust_channel_buffer *chan),
+               void (*get_value)(void *priv, struct lttng_ust_ctx_value *value),
+               void *priv)
+       __attribute__((visibility("hidden")));
+
+#endif /* _LTTNG_UST_EVENTS_INTERNAL_H */
index cb128a692adda5de9901429964c2bdf96d535bc8..c5f75629a5e3a24bd3b672739abacb4efd3c6ad5 100644 (file)
@@ -14,7 +14,7 @@
 #include <urcu/rculist.h>
 #include <lttng/ust-endian.h>
 #include <lttng/ust-events.h>
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 
 #include "lttng-bytecode.h"
 #include "string-utils.h"
index 3d7b5c2a61435a3c7becf30f51b6b47329830170..bf7af5d54d6b24de1324e38a7afebb215b9290e8 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "context-internal.h"
 #include "lttng-bytecode.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/macros.h"
 
 static int lttng_fls(int val)
index 91c4cace96c1675a3509214dc35028e8f8941b2f..34657d00cd3b68ab8f5151637f41bb3521c02878 100644 (file)
@@ -16,7 +16,7 @@
 #include "lttng-bytecode.h"
 #include "lttng-hash-helper.h"
 #include "string-utils.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/macros.h"
 
 /*
index 68108192d08158ca68e868e76fdcf590778862a5..8d3971bfe18917e910ac9a7ddd03c60cb607b30d 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "context-internal.h"
 #include "lttng-bytecode.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/macros.h"
 
 static const char *opnames[] = {
index a72369e12f9ef3ac757c98941aa43466323ce985..46f721204567c5f5e85cafd06e5f4670c45e31ed 100644 (file)
@@ -23,7 +23,7 @@
 #include <limits.h>
 #include "common/logging.h"
 #include "bytecode.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 
 /* Interpreter stack length, in number of entries */
 #define INTERPRETER_STACK_LEN  10      /* includes 2 dummy */
index 5f5b5cbfeac086aaaa5117fd08adc21519c51e6e..2f14522055552ebc04c6eb3921ea03b880777558 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "context-internal.h"
 #include "lttng-tracer-core.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 
 /*
  * We use a global perf counter key and iterate on per-thread RCU lists
index df087c4d745e6ab1ed2aa1c6f90b96eeb912585e..0f9f5fe4ce0ca349fb7088f9f2b79c151e97bd26 100644 (file)
@@ -8,7 +8,7 @@
  * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/counter/counter.h"
 #include "common/counter/counter-api.h"
 #include "lttng-tracer-core.h"
index 021146e6dd078e15b58f59ad85c0535e1e4e79fb..62ddfe5d6471bb237ba395c9b62025ec4ce1a206 100644 (file)
@@ -8,7 +8,7 @@
  * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/counter/counter.h"
 #include "common/counter/counter-api.h"
 #include "lttng-tracer-core.h"
index d5e088495cf57c49b09527524caa4c9e8e765b9a..13becb9111f13090606c9bdefef5679e7c9a42d7 100644 (file)
@@ -49,7 +49,7 @@
 #include "lttng-tracer-core.h"
 #include "lttng-ust-statedump.h"
 #include "context-internal.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "wait.h"
 #include "common/ringbuffer/shm.h"
 #include "common/ringbuffer/frontend_types.h"
index 553770ea2954049fdaa311477c16f71e2e8521ca..2dff30f43800e9edf77f4cc3b0d94adccae692d5 100644 (file)
@@ -21,7 +21,7 @@
 #include "lttng-tracer-core.h"
 #include "jhash.h"
 #include "error.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 
 /*
  * probe list is protected by ust_lock()/ust_unlock().
index 880ae94ce1b5c989ce3672666d8912a2b2ffbb02..fea1774fb55e191b1d5115ff6115bf105deaeefb 100644 (file)
@@ -10,7 +10,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include <ust-events-internal.h>
+#include "lib/lttng-ust/events.h"
 #include <lttng/urcu/pointer.h>
 #include "common/bitfield.h"
 #include "common/align.h"
index 954fc0202ea6d7e7e1e33e0b73de1265e2f73870..a2ea1b02fbc330aa3c036c31fdfbb53b007ea0eb 100644 (file)
@@ -10,7 +10,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include <ust-events-internal.h>
+#include "lib/lttng-ust/events.h"
 #include "common/bitfield.h"
 #include "common/align.h"
 #include "lttng-tracer.h"
index f1096d06f9716ace6370490474e85ff29e959c3e..f8e0f5bbdd907faf083a6c9271688ea056060869 100644 (file)
@@ -46,7 +46,7 @@
 #include "tracepoint-internal.h"
 #include "lttng-tracer.h"
 #include "string-utils.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "context-internal.h"
 #include "common/macros.h"
 
index 2f6fe18faefa2a604e594ef0e487a7dee5bdc376..6f5be12060c3023b78b160cfdb48dce1ec5ac55b 100644 (file)
@@ -52,7 +52,7 @@
 #include "clock.h"
 #include "lib/lttng-ust/getcpu.h"
 #include "common/getenv.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "context-internal.h"
 #include "common/align.h"
 #include "lttng-counter-client.h"
index 2dae71f963794d8578af14ffbb552bbdb017f2fb..1873fa4c86bff4379c8475156ad82e161f932cf5 100644 (file)
@@ -22,7 +22,7 @@
 #include "lttng-ust-statedump.h"
 #include "jhash.h"
 #include "common/getenv.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 
 #define TRACEPOINT_DEFINE
 #include "ust_lib.h"                           /* Only define. */
index d4829904304c2314bfefe78c6f4f7e5b5d6b466e..88330a1e5841370e01f11ad8d7d363aea8855d7b 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdlib.h>
 
 #include "context-internal.h"
-#include "ust-events-internal.h"
+#include "lib/lttng-ust/events.h"
 #include "common/logging.h"
 #include "lttng-tracer-core.h"
 #include "lttng-rb-clients.h"
diff --git a/src/lib/lttng-ust/ust-events-internal.h b/src/lib/lttng-ust/ust-events-internal.h
deleted file mode 100644 (file)
index 21d40e1..0000000
+++ /dev/null
@@ -1,905 +0,0 @@
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright 2019 (c) Francis Deslauriers <francis.deslauriers@efficios.com>
- */
-
-#ifndef _LTTNG_UST_EVENTS_INTERNAL_H
-#define _LTTNG_UST_EVENTS_INTERNAL_H
-
-#include <limits.h>
-#include <stdint.h>
-
-#include <urcu/list.h>
-#include <urcu/hlist.h>
-
-#include <lttng/ust-events.h>
-
-#include "common/macros.h"
-#include "common/ust-context-provider.h"
-
-struct lttng_ust_abi_obj;
-struct lttng_event_notifier_group;
-
-union lttng_ust_abi_args {
-       struct {
-               void *chan_data;
-               int wakeup_fd;
-       } channel;
-       struct {
-               int shm_fd;
-               int wakeup_fd;
-       } stream;
-       struct {
-               struct lttng_ust_abi_field_iter entry;
-       } field_list;
-       struct {
-               char *ctxname;
-       } app_context;
-       struct {
-               int event_notifier_notif_fd;
-       } event_notifier_handle;
-       struct {
-               void *counter_data;
-       } counter;
-       struct {
-               int shm_fd;
-       } counter_shm;
-};
-
-struct lttng_ust_abi_objd_ops {
-       long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
-               union lttng_ust_abi_args *args, void *owner);
-       int (*release)(int objd);
-};
-
-enum lttng_enabler_format_type {
-       LTTNG_ENABLER_FORMAT_STAR_GLOB,
-       LTTNG_ENABLER_FORMAT_EVENT,
-};
-
-/*
- * Enabler field, within whatever object is enabling an event. Target of
- * backward reference.
- */
-struct lttng_enabler {
-       enum lttng_enabler_format_type format_type;
-
-       /* head list of struct lttng_ust_filter_bytecode_node */
-       struct cds_list_head filter_bytecode_head;
-       /* head list of struct lttng_ust_excluder_node */
-       struct cds_list_head excluder_head;
-
-       struct lttng_ust_abi_event event_param;
-       unsigned int enabled:1;
-};
-
-struct lttng_event_enabler {
-       struct lttng_enabler base;
-       struct cds_list_head node;      /* per-session list of enablers */
-       struct lttng_ust_channel_buffer *chan;
-       /*
-        * Unused, but kept around to make it explicit that the tracer can do
-        * it.
-        */
-       struct lttng_ust_ctx *ctx;
-};
-
-struct lttng_event_notifier_enabler {
-       struct lttng_enabler base;
-       uint64_t error_counter_index;
-       struct cds_list_head node;      /* per-app list of event_notifier enablers */
-       struct cds_list_head capture_bytecode_head;
-       struct lttng_event_notifier_group *group; /* weak ref */
-       uint64_t user_token;            /* User-provided token */
-       uint64_t num_captures;
-};
-
-enum lttng_ust_bytecode_type {
-       LTTNG_UST_BYTECODE_TYPE_FILTER,
-       LTTNG_UST_BYTECODE_TYPE_CAPTURE,
-};
-
-struct lttng_ust_bytecode_node {
-       enum lttng_ust_bytecode_type type;
-       struct cds_list_head node;
-       struct lttng_enabler *enabler;
-       struct  {
-               uint32_t len;
-               uint32_t reloc_offset;
-               uint64_t seqnum;
-               char data[];
-       } bc;
-};
-
-/*
- * Bytecode interpreter return value.
- */
-enum lttng_ust_bytecode_interpreter_ret {
-       LTTNG_UST_BYTECODE_INTERPRETER_ERROR = -1,
-       LTTNG_UST_BYTECODE_INTERPRETER_OK = 0,
-};
-
-struct lttng_interpreter_output;
-struct lttng_ust_bytecode_runtime_private;
-
-enum lttng_ust_bytecode_filter_result {
-       LTTNG_UST_BYTECODE_FILTER_ACCEPT = 0,
-       LTTNG_UST_BYTECODE_FILTER_REJECT = 1,
-};
-
-struct lttng_ust_bytecode_filter_ctx {
-       enum lttng_ust_bytecode_filter_result result;
-};
-
-struct lttng_ust_excluder_node {
-       struct cds_list_head node;
-       struct lttng_enabler *enabler;
-       /*
-        * struct lttng_ust_event_exclusion had variable sized array,
-        * must be last field.
-        */
-       struct lttng_ust_abi_event_exclusion excluder;
-};
-
-/* Data structures used by the tracer. */
-
-struct tp_list_entry {
-       struct lttng_ust_abi_tracepoint_iter tp;
-       struct cds_list_head head;
-};
-
-struct lttng_ust_tracepoint_list {
-       struct tp_list_entry *iter;
-       struct cds_list_head head;
-};
-
-struct tp_field_list_entry {
-       struct lttng_ust_abi_field_iter field;
-       struct cds_list_head head;
-};
-
-struct lttng_ust_field_list {
-       struct tp_field_list_entry *iter;
-       struct cds_list_head head;
-};
-
-/*
- * Objects in a linked-list of enablers, owned by an event or event_notifier.
- * This is used because an event (or a event_notifier) can be enabled by more
- * than one enabler and we want a quick way to iterate over all enablers of an
- * object.
- *
- * For example, event rules "my_app:a*" and "my_app:ab*" will both match the
- * event with the name "my_app:abc".
- */
-struct lttng_enabler_ref {
-       struct cds_list_head node;              /* enabler ref list */
-       struct lttng_enabler *ref;              /* backward ref */
-};
-
-#define LTTNG_COUNTER_DIMENSION_MAX    8
-struct lttng_counter_dimension {
-       uint64_t size;
-       uint64_t underflow_index;
-       uint64_t overflow_index;
-       uint8_t has_underflow;
-       uint8_t has_overflow;
-};
-
-struct lttng_counter_ops {
-       struct lib_counter *(*counter_create)(size_t nr_dimensions,
-                       const struct lttng_counter_dimension *dimensions,
-                       int64_t global_sum_step,
-                       int global_counter_fd,
-                       int nr_counter_cpu_fds,
-                       const int *counter_cpu_fds,
-                       bool is_daemon);
-       void (*counter_destroy)(struct lib_counter *counter);
-       int (*counter_add)(struct lib_counter *counter,
-                       const size_t *dimension_indexes, int64_t v);
-       int (*counter_read)(struct lib_counter *counter,
-                       const size_t *dimension_indexes, int cpu,
-                       int64_t *value, bool *overflow, bool *underflow);
-       int (*counter_aggregate)(struct lib_counter *counter,
-                       const size_t *dimension_indexes, int64_t *value,
-                       bool *overflow, bool *underflow);
-       int (*counter_clear)(struct lib_counter *counter, const size_t *dimension_indexes);
-};
-
-struct lttng_counter {
-       int objd;
-       struct lttng_event_notifier_group *event_notifier_group;    /* owner */
-       struct lttng_counter_transport *transport;
-       struct lib_counter *counter;
-       struct lttng_counter_ops *ops;
-};
-
-#define LTTNG_UST_EVENT_HT_BITS                12
-#define LTTNG_UST_EVENT_HT_SIZE                (1U << LTTNG_UST_EVENT_HT_BITS)
-
-struct lttng_ust_event_ht {
-       struct cds_hlist_head table[LTTNG_UST_EVENT_HT_SIZE];
-};
-
-#define LTTNG_UST_EVENT_NOTIFIER_HT_BITS               12
-#define LTTNG_UST_EVENT_NOTIFIER_HT_SIZE               (1U << LTTNG_UST_EVENT_NOTIFIER_HT_BITS)
-struct lttng_ust_event_notifier_ht {
-       struct cds_hlist_head table[LTTNG_UST_EVENT_NOTIFIER_HT_SIZE];
-};
-
-#define LTTNG_UST_ENUM_HT_BITS         12
-#define LTTNG_UST_ENUM_HT_SIZE         (1U << LTTNG_UST_ENUM_HT_BITS)
-
-struct lttng_ust_enum_ht {
-       struct cds_hlist_head table[LTTNG_UST_ENUM_HT_SIZE];
-};
-
-struct lttng_event_notifier_group {
-       int objd;
-       void *owner;
-       int notification_fd;
-       struct cds_list_head node;              /* Event notifier group handle list */
-       struct cds_list_head enablers_head;
-       struct cds_list_head event_notifiers_head; /* list of event_notifiers */
-       struct lttng_ust_event_notifier_ht event_notifiers_ht; /* hashtable of event_notifiers */
-       struct lttng_ust_ctx *ctx;              /* contexts for filters. */
-
-       struct lttng_counter *error_counter;
-       size_t error_counter_len;
-};
-
-struct lttng_transport {
-       const char *name;
-       struct cds_list_head node;
-       struct lttng_ust_channel_buffer_ops ops;
-       const struct lttng_ust_lib_ring_buffer_config *client_config;
-};
-
-struct lttng_counter_transport {
-       const char *name;
-       struct cds_list_head node;
-       struct lttng_counter_ops ops;
-       const struct lib_counter_config *client_config;
-};
-
-struct lttng_ust_event_common_private {
-       struct lttng_ust_event_common *pub;     /* Public event interface */
-
-       const struct lttng_ust_event_desc *desc;
-       /* Backward references: list of lttng_enabler_ref (ref to enablers) */
-       struct cds_list_head enablers_ref_head;
-       int registered;                         /* has reg'd tracepoint probe */
-       uint64_t user_token;
-
-       int has_enablers_without_filter_bytecode;
-       /* list of struct lttng_ust_bytecode_runtime, sorted by seqnum */
-       struct cds_list_head filter_bytecode_runtime_head;
-};
-
-struct lttng_ust_event_recorder_private {
-       struct lttng_ust_event_common_private parent;
-
-       struct lttng_ust_event_recorder *pub;   /* Public event interface */
-       struct cds_list_head node;              /* Event recorder list */
-       struct cds_hlist_node hlist;            /* Hash table of event recorders */
-       struct lttng_ust_ctx *ctx;
-       unsigned int id;
-};
-
-struct lttng_ust_event_notifier_private {
-       struct lttng_ust_event_common_private parent;
-
-       struct lttng_ust_event_notifier *pub;   /* Public event notifier interface */
-       struct lttng_event_notifier_group *group; /* weak ref */
-       size_t num_captures;                    /* Needed to allocate the msgpack array. */
-       uint64_t error_counter_index;
-       struct cds_list_head node;              /* Event notifier list */
-       struct cds_hlist_node hlist;            /* Hash table of event notifiers */
-       struct cds_list_head capture_bytecode_runtime_head;
-};
-
-struct lttng_ust_bytecode_runtime {
-       enum lttng_ust_bytecode_type type;
-       struct lttng_ust_bytecode_node *bc;
-       int link_failed;
-       int (*interpreter_func)(struct lttng_ust_bytecode_runtime *bytecode_runtime,
-                       const char *interpreter_stack_data,
-                       void *ctx);
-       struct cds_list_head node;              /* list of bytecode runtime in event */
-       /*
-        * Pointer to a URCU-protected pointer owned by an `struct
-        * lttng_session`or `struct lttng_event_notifier_group`.
-        */
-       struct lttng_ust_ctx **pctx;
-};
-
-struct lttng_ust_session_private {
-       struct lttng_ust_session *pub;          /* Public session interface */
-
-       int been_active;                        /* Been active ? */
-       int objd;                               /* Object associated */
-       struct cds_list_head chan_head;         /* Channel list head */
-       struct cds_list_head events_head;       /* list of events */
-       struct cds_list_head node;              /* Session list */
-
-       /* List of enablers */
-       struct cds_list_head enablers_head;
-       struct lttng_ust_event_ht events_ht;    /* ht of events */
-       void *owner;                            /* object owner */
-       int tstate:1;                           /* Transient enable state */
-
-       int statedump_pending:1;
-
-       struct lttng_ust_enum_ht enums_ht;      /* ht of enumerations */
-       struct cds_list_head enums_head;
-       struct lttng_ust_ctx *ctx;              /* contexts for filters. */
-
-       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
-       bool uuid_set;                          /* Is uuid set ? */
-};
-
-struct lttng_enum {
-       const struct lttng_ust_enum_desc *desc;
-       struct lttng_ust_session *session;
-       struct cds_list_head node;              /* Enum list in session */
-       struct cds_hlist_node hlist;            /* Session ht of enums */
-       uint64_t id;                            /* Enumeration ID in sessiond */
-};
-
-struct lttng_ust_shm_handle;
-
-struct lttng_ust_channel_buffer_ops_private {
-       struct lttng_ust_channel_buffer_ops *pub;       /* Public channel buffer ops interface */
-
-       struct lttng_ust_channel_buffer *(*channel_create)(const char *name,
-                       void *buf_addr,
-                       size_t subbuf_size, size_t num_subbuf,
-                       unsigned int switch_timer_interval,
-                       unsigned int read_timer_interval,
-                       unsigned char *uuid,
-                       uint32_t chan_id,
-                       const int *stream_fds, int nr_stream_fds,
-                       int64_t blocking_timeout);
-       void (*channel_destroy)(struct lttng_ust_channel_buffer *chan);
-       /*
-        * packet_avail_size returns the available size in the current
-        * packet. Note that the size returned is only a hint, since it
-        * may change due to concurrent writes.
-        */
-       size_t (*packet_avail_size)(struct lttng_ust_channel_buffer *chan);
-       int (*is_finalized)(struct lttng_ust_channel_buffer *chan);
-       int (*is_disabled)(struct lttng_ust_channel_buffer *chan);
-       int (*flush_buffer)(struct lttng_ust_channel_buffer *chan);
-};
-
-struct lttng_ust_channel_common_private {
-       struct lttng_ust_channel_common *pub;   /* Public channel interface */
-
-       int objd;                               /* Object associated with channel. */
-       int tstate:1;                           /* Transient enable state */
-};
-
-struct lttng_ust_channel_buffer_private {
-       struct lttng_ust_channel_common_private parent;
-
-       struct lttng_ust_channel_buffer *pub;   /* Public channel buffer interface */
-       struct cds_list_head node;              /* Channel list in session */
-       int header_type;                        /* 0: unset, 1: compact, 2: large */
-       unsigned int id;                        /* Channel ID */
-       enum lttng_ust_abi_chan_type type;
-       struct lttng_ust_ctx *ctx;
-       struct lttng_ust_lib_ring_buffer_channel *rb_chan;      /* Ring buffer channel */
-       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
-};
-
-/*
- * IMPORTANT: this structure is part of the ABI between the consumer
- * daemon and the UST library within traced applications. Changing it
- * breaks the UST communication protocol.
- *
- * TODO: remove unused fields on next UST communication protocol
- * breaking update.
- */
-struct lttng_ust_abi_channel_config {
-       void *unused1;
-       int unused2;
-       void *unused3;
-       void *unused4;
-       int unused5;
-       struct cds_list_head unused6;
-       void *unused7;
-       int unused8;
-       void *unused9;
-
-       /* Channel ID */
-       unsigned int id;
-       enum lttng_ust_abi_chan_type unused10;
-       unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
-       int unused11:1;
-};
-
-/* Global (filter), event and channel contexts. */
-struct lttng_ust_ctx {
-       struct lttng_ust_ctx_field *fields;
-       unsigned int nr_fields;
-       unsigned int allocated_fields;
-       unsigned int largest_align;
-};
-
-struct lttng_ust_registered_probe {
-       const struct lttng_ust_probe_desc *desc;
-
-       struct cds_list_head head;              /* chain registered probes */
-       struct cds_list_head lazy_init_head;
-       int lazy;                               /* lazy registration */
-};
-
-/*
- * Context field
- */
-
-struct lttng_ust_ctx_field {
-       const struct lttng_ust_event_field *event_field;
-       size_t (*get_size)(void *priv, size_t offset);
-       void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                      struct lttng_ust_channel_buffer *chan);
-       void (*get_value)(void *priv, struct lttng_ust_ctx_value *value);
-       void (*destroy)(void *priv);
-       void *priv;
-};
-
-static inline
-const struct lttng_ust_type_integer *lttng_ust_get_type_integer(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_integer)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_integer, parent);
-}
-
-static inline
-const struct lttng_ust_type_float *lttng_ust_get_type_float(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_float)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_float, parent);
-}
-
-static inline
-const struct lttng_ust_type_string *lttng_ust_get_type_string(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_string)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_string, parent);
-}
-
-static inline
-const struct lttng_ust_type_enum *lttng_ust_get_type_enum(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_enum)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_enum, parent);
-}
-
-static inline
-const struct lttng_ust_type_array *lttng_ust_get_type_array(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_array)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_array, parent);
-}
-
-static inline
-const struct lttng_ust_type_sequence *lttng_ust_get_type_sequence(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_sequence)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_sequence, parent);
-}
-
-static inline
-const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng_ust_type_common *type)
-{
-       if (type->type != lttng_ust_type_struct)
-               return NULL;
-       return caa_container_of(type, const struct lttng_ust_type_struct, parent);
-}
-
-#define lttng_ust_static_type_integer(_size, _alignment, _signedness, _byte_order, _base)              \
-       ((const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_integer, { \
-               .parent = {                                                                             \
-                       .type = lttng_ust_type_integer,                                                 \
-               },                                                                                      \
-               .struct_size = sizeof(struct lttng_ust_type_integer),                                   \
-               .size = (_size),                                                                        \
-               .alignment = (_alignment),                                                              \
-               .signedness = (_signedness),                                                            \
-               .reverse_byte_order = (_byte_order) != BYTE_ORDER,                                      \
-               .base = (_base),                                                                        \
-       }))
-
-#define lttng_ust_static_type_array_text(_length)                                                      \
-       ((const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \
-               .parent = {                                                                             \
-                       .type = lttng_ust_type_array,                                                   \
-               },                                                                                      \
-               .struct_size = sizeof(struct lttng_ust_type_array),                                     \
-               .length = (_length),                                                                    \
-               .alignment = 0,                                                                         \
-               .encoding = lttng_ust_string_encoding_UTF8,                                             \
-               .elem_type = lttng_ust_static_type_integer(sizeof(char) * CHAR_BIT,                     \
-                               lttng_ust_rb_alignof(char) * CHAR_BIT, lttng_ust_is_signed_type(char),  \
-                               BYTE_ORDER, 10),                                                        \
-       }))
-
-#define lttng_ust_static_event_field(_name, _type, _nowrite, _nofilter)                                        \
-       __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, {                                  \
-               .struct_size = sizeof(struct lttng_ust_event_field),                                    \
-               .name = (_name),                                                                        \
-               .type = (_type),                                                                        \
-               .nowrite = (_nowrite),                                                                  \
-               .nofilter = (_nofilter),                                                                \
-       })
-
-#define lttng_ust_static_ctx_field(_event_field, _get_size, _record, _get_value, _destroy, _priv)      \
-       __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_ctx_field, {                                    \
-               .event_field = (_event_field),                                                          \
-               .get_size = (_get_size),                                                                \
-               .record = (_record),                                                                    \
-               .get_value = (_get_value),                                                              \
-               .destroy = (_destroy),                                                                  \
-               .priv = (_priv),                                                                        \
-       })
-
-static inline
-struct lttng_enabler *lttng_event_enabler_as_enabler(
-               struct lttng_event_enabler *event_enabler)
-{
-       return &event_enabler->base;
-}
-
-static inline
-struct lttng_enabler *lttng_event_notifier_enabler_as_enabler(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-{
-       return &event_notifier_enabler->base;
-}
-
-/*
- * Allocate and initialize a `struct lttng_event_enabler` object.
- *
- * On success, returns a `struct lttng_event_enabler`,
- * On memory error, returns NULL.
- */
-struct lttng_event_enabler *lttng_event_enabler_create(
-               enum lttng_enabler_format_type format_type,
-               struct lttng_ust_abi_event *event_param,
-               struct lttng_ust_channel_buffer *chan)
-       __attribute__((visibility("hidden")));
-
-/*
- * Destroy a `struct lttng_event_enabler` object.
- */
-void lttng_event_enabler_destroy(struct lttng_event_enabler *enabler)
-       __attribute__((visibility("hidden")));
-
-/*
- * Enable a `struct lttng_event_enabler` object and all events related to this
- * enabler.
- */
-int lttng_event_enabler_enable(struct lttng_event_enabler *enabler)
-       __attribute__((visibility("hidden")));
-
-/*
- * Disable a `struct lttng_event_enabler` object and all events related to this
- * enabler.
- */
-int lttng_event_enabler_disable(struct lttng_event_enabler *enabler)
-       __attribute__((visibility("hidden")));
-
-/*
- * Attach filter bytecode program to `struct lttng_event_enabler` and all
- * events related to this enabler.
- */
-int lttng_event_enabler_attach_filter_bytecode(
-               struct lttng_event_enabler *enabler,
-               struct lttng_ust_bytecode_node **bytecode)
-       __attribute__((visibility("hidden")));
-
-/*
- * Attach an application context to an event enabler.
- *
- * Not implemented.
- */
-int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
-               struct lttng_ust_abi_context *ctx)
-       __attribute__((visibility("hidden")));
-
-/*
- * Attach exclusion list to `struct lttng_event_enabler` and all
- * events related to this enabler.
- */
-int lttng_event_enabler_attach_exclusion(struct lttng_event_enabler *enabler,
-               struct lttng_ust_excluder_node **excluder)
-       __attribute__((visibility("hidden")));
-
-/*
- * Synchronize bytecodes for the enabler and the instance (event or
- * event_notifier).
- *
- * This function goes over all bytecode programs of the enabler (event or
- * event_notifier enabler) to ensure each is linked to the provided instance.
- */
-void lttng_enabler_link_bytecode(const struct lttng_ust_event_desc *event_desc,
-               struct lttng_ust_ctx **ctx,
-               struct cds_list_head *instance_bytecode_runtime_head,
-               struct cds_list_head *enabler_bytecode_runtime_head)
-       __attribute__((visibility("hidden")));
-
-/*
- * Allocate and initialize a `struct lttng_event_notifier_group` object.
- *
- * On success, returns a `struct lttng_triggre_group`,
- * on memory error, returns NULL.
- */
-struct lttng_event_notifier_group *lttng_event_notifier_group_create(void)
-       __attribute__((visibility("hidden")));
-
-/*
- * Destroy a `struct lttng_event_notifier_group` object.
- */
-void lttng_event_notifier_group_destroy(
-               struct lttng_event_notifier_group *event_notifier_group)
-       __attribute__((visibility("hidden")));
-
-/*
- * Allocate and initialize a `struct lttng_event_notifier_enabler` object.
- *
- * On success, returns a `struct lttng_event_notifier_enabler`,
- * On memory error, returns NULL.
- */
-struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
-               struct lttng_event_notifier_group *event_notifier_group,
-               enum lttng_enabler_format_type format_type,
-               struct lttng_ust_abi_event_notifier *event_notifier_param)
-       __attribute__((visibility("hidden")));
-
-/*
- * Destroy a `struct lttng_event_notifier_enabler` object.
- */
-void lttng_event_notifier_enabler_destroy(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-       __attribute__((visibility("hidden")));
-
-/*
- * Enable a `struct lttng_event_notifier_enabler` object and all event
- * notifiers related to this enabler.
- */
-int lttng_event_notifier_enabler_enable(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-       __attribute__((visibility("hidden")));
-
-/*
- * Disable a `struct lttng_event_notifier_enabler` object and all event
- * notifiers related to this enabler.
- */
-int lttng_event_notifier_enabler_disable(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-       __attribute__((visibility("hidden")));
-
-/*
- * Attach filter bytecode program to `struct lttng_event_notifier_enabler` and
- * all event notifiers related to this enabler.
- */
-int lttng_event_notifier_enabler_attach_filter_bytecode(
-               struct lttng_event_notifier_enabler *event_notifier_enabler,
-               struct lttng_ust_bytecode_node **bytecode)
-       __attribute__((visibility("hidden")));
-
-/*
- * Attach capture bytecode program to `struct lttng_event_notifier_enabler` and
- * all event_notifiers related to this enabler.
- */
-int lttng_event_notifier_enabler_attach_capture_bytecode(
-               struct lttng_event_notifier_enabler *event_notifier_enabler,
-               struct lttng_ust_bytecode_node **bytecode)
-       __attribute__((visibility("hidden")));
-
-/*
- * Attach exclusion list to `struct lttng_event_notifier_enabler` and all
- * event notifiers related to this enabler.
- */
-int lttng_event_notifier_enabler_attach_exclusion(
-               struct lttng_event_notifier_enabler *event_notifier_enabler,
-               struct lttng_ust_excluder_node **excluder)
-       __attribute__((visibility("hidden")));
-
-void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event)
-       __attribute__((visibility("hidden")));
-
-/*
- * Connect the probe on all enablers matching this event description.
- * Called on library load.
- */
-int lttng_fix_pending_event_notifiers(void)
-       __attribute__((visibility("hidden")));
-
-struct lttng_counter *lttng_ust_counter_create(
-               const char *counter_transport_name,
-               size_t number_dimensions, const struct lttng_counter_dimension *dimensions)
-       __attribute__((visibility("hidden")));
-
-#ifdef HAVE_LINUX_PERF_EVENT_H
-
-int lttng_add_perf_counter_to_ctx(uint32_t type,
-                                 uint64_t config,
-                                 const char *name,
-                                 struct lttng_ust_ctx **ctx)
-       __attribute__((visibility("hidden")));
-
-int lttng_perf_counter_init(void)
-       __attribute__((visibility("hidden")));
-
-void lttng_perf_counter_exit(void)
-       __attribute__((visibility("hidden")));
-
-#else /* #ifdef HAVE_LINUX_PERF_EVENT_H */
-
-static inline
-int lttng_add_perf_counter_to_ctx(uint32_t type,
-                                 uint64_t config,
-                                 const char *name,
-                                 struct lttng_ust_ctx **ctx)
-{
-       return -ENOSYS;
-}
-static inline
-int lttng_perf_counter_init(void)
-{
-       return 0;
-}
-static inline
-void lttng_perf_counter_exit(void)
-{
-}
-#endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */
-
-int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list)
-       __attribute__((visibility("hidden")));
-
-void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list)
-       __attribute__((visibility("hidden")));
-
-int lttng_probes_get_field_list(struct lttng_ust_field_list *list)
-       __attribute__((visibility("hidden")));
-
-void lttng_probes_prune_field_list(struct lttng_ust_field_list *list)
-       __attribute__((visibility("hidden")));
-
-struct lttng_ust_abi_tracepoint_iter *
-       lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list)
-       __attribute__((visibility("hidden")));
-
-struct lttng_ust_abi_field_iter *
-       lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list)
-       __attribute__((visibility("hidden")));
-
-struct lttng_ust_session *lttng_session_create(void)
-       __attribute__((visibility("hidden")));
-
-int lttng_session_enable(struct lttng_ust_session *session)
-       __attribute__((visibility("hidden")));
-
-int lttng_session_disable(struct lttng_ust_session *session)
-       __attribute__((visibility("hidden")));
-
-int lttng_session_statedump(struct lttng_ust_session *session)
-       __attribute__((visibility("hidden")));
-
-void lttng_session_destroy(struct lttng_ust_session *session)
-       __attribute__((visibility("hidden")));
-
-/*
- * Called with ust lock held.
- */
-int lttng_session_active(void)
-       __attribute__((visibility("hidden")));
-
-struct cds_list_head *lttng_get_sessions(void)
-       __attribute__((visibility("hidden")));
-
-void lttng_handle_pending_statedump(void *owner)
-       __attribute__((visibility("hidden")));
-
-int lttng_channel_enable(struct lttng_ust_channel_common *lttng_channel)
-       __attribute__((visibility("hidden")));
-
-int lttng_channel_disable(struct lttng_ust_channel_common *lttng_channel)
-       __attribute__((visibility("hidden")));
-
-void lttng_transport_register(struct lttng_transport *transport)
-       __attribute__((visibility("hidden")));
-
-void lttng_transport_unregister(struct lttng_transport *transport)
-       __attribute__((visibility("hidden")));
-
-/* This is ABI between liblttng-ust and liblttng-ust-ctl */
-struct lttng_transport *lttng_ust_transport_find(const char *name);
-
-/* This is ABI between liblttng-ust and liblttng-ust-dl */
-void lttng_ust_dl_update(void *ip);
-
-void lttng_probe_provider_unregister_events(const struct lttng_ust_probe_desc *desc)
-       __attribute__((visibility("hidden")));
-
-int lttng_fix_pending_events(void)
-       __attribute__((visibility("hidden")));
-
-struct cds_list_head *lttng_get_probe_list_head(void)
-       __attribute__((visibility("hidden")));
-
-struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session,
-               const struct lttng_ust_enum_desc *enum_desc)
-       __attribute__((visibility("hidden")));
-
-int lttng_abi_create_root_handle(void)
-       __attribute__((visibility("hidden")));
-
-const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id)
-       __attribute__((visibility("hidden")));
-
-int lttng_ust_abi_objd_unref(int id, int is_owner)
-       __attribute__((visibility("hidden")));
-
-void lttng_ust_abi_exit(void)
-       __attribute__((visibility("hidden")));
-
-void lttng_ust_abi_events_exit(void)
-       __attribute__((visibility("hidden")));
-
-void lttng_ust_abi_objd_table_owner_cleanup(void *owner)
-       __attribute__((visibility("hidden")));
-
-struct lttng_ust_channel_buffer *lttng_ust_alloc_channel_buffer(void)
-       __attribute__((visibility("hidden")));
-
-void lttng_ust_free_channel_common(struct lttng_ust_channel_common *chan)
-       __attribute__((visibility("hidden")));
-
-int lttng_ust_interpret_event_filter(struct lttng_ust_event_common *event,
-               const char *interpreter_stack_data,
-               void *filter_ctx)
-       __attribute__((visibility("hidden")));
-
-int lttng_ust_session_uuid_validate(struct lttng_ust_session *session,
-               unsigned char *uuid)
-       __attribute__((visibility("hidden")));
-
-bool lttng_ust_validate_event_name(const struct lttng_ust_event_desc *desc)
-       __attribute__((visibility("hidden")));
-
-void lttng_ust_format_event_name(const struct lttng_ust_event_desc *desc,
-               char *name)
-       __attribute__((visibility("hidden")));
-
-int lttng_ust_add_app_context_to_ctx_rcu(const char *name, struct lttng_ust_ctx **ctx)
-       __attribute__((visibility("hidden")));
-
-int lttng_ust_context_set_provider_rcu(struct lttng_ust_ctx **_ctx,
-               const char *name,
-               size_t (*get_size)(void *priv, size_t offset),
-               void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                       struct lttng_ust_channel_buffer *chan),
-               void (*get_value)(void *priv, struct lttng_ust_ctx_value *value),
-               void *priv)
-       __attribute__((visibility("hidden")));
-
-void lttng_ust_context_set_session_provider(const char *name,
-               size_t (*get_size)(void *priv, size_t offset),
-               void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                       struct lttng_ust_channel_buffer *chan),
-               void (*get_value)(void *priv, struct lttng_ust_ctx_value *value),
-               void *priv)
-       __attribute__((visibility("hidden")));
-
-#endif /* _LTTNG_UST_EVENTS_INTERNAL_H */
This page took 0.051719 seconds and 4 git commands to generate.