#define __ust_stringify(x) __ust_stringify1(x)
#endif /* __ust_stringify */
-#define LTTNG_UST_SYM_NAME_LEN 256
+#define LTTNG_UST_ABI_SYM_NAME_LEN 256
#define LTTNG_UST_ABI_PROCNAME_LEN 16
/* UST comm magic number, used to validate protocol and endianness. */
-#define LTTNG_UST_COMM_MAGIC 0xC57C57C5
+#define LTTNG_UST_ABI_COMM_MAGIC 0xC57C57C5
/* Version for ABI between liblttng-ust, sessiond, consumerd */
#define LTTNG_UST_ABI_MAJOR_VERSION 9
#define LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE 8
#define LTTNG_UST_ABI_MINOR_VERSION 0
-enum lttng_ust_instrumentation {
- LTTNG_UST_TRACEPOINT = 0,
- LTTNG_UST_PROBE = 1,
- LTTNG_UST_FUNCTION = 2,
+enum lttng_ust_abi_instrumentation {
+ LTTNG_UST_ABI_TRACEPOINT = 0,
+ LTTNG_UST_ABI_PROBE = 1,
+ LTTNG_UST_ABI_FUNCTION = 2,
};
-enum lttng_ust_loglevel_type {
- LTTNG_UST_LOGLEVEL_ALL = 0,
- LTTNG_UST_LOGLEVEL_RANGE = 1,
- LTTNG_UST_LOGLEVEL_SINGLE = 2,
+enum lttng_ust_abi_loglevel_type {
+ LTTNG_UST_ABI_LOGLEVEL_ALL = 0,
+ LTTNG_UST_ABI_LOGLEVEL_RANGE = 1,
+ LTTNG_UST_ABI_LOGLEVEL_SINGLE = 2,
};
-enum lttng_ust_output {
- LTTNG_UST_MMAP = 0,
+enum lttng_ust_abi_output {
+ LTTNG_UST_ABI_MMAP = 0,
};
-enum lttng_ust_chan_type {
- LTTNG_UST_CHAN_PER_CPU = 0,
- LTTNG_UST_CHAN_METADATA = 1,
+enum lttng_ust_abi_chan_type {
+ LTTNG_UST_ABI_CHAN_PER_CPU = 0,
+ LTTNG_UST_ABI_CHAN_METADATA = 1,
};
-struct lttng_ust_tracer_version {
+struct lttng_ust_abi_tracer_version {
uint32_t major;
uint32_t minor;
uint32_t patchlevel;
} LTTNG_PACKED;
-#define LTTNG_UST_CHANNEL_PADDING (LTTNG_UST_SYM_NAME_LEN + 32)
+#define LTTNG_UST_ABI_CHANNEL_PADDING (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
/*
* Given that the consumerd is limited to 64k file descriptors, we
* cannot expect much more than 1MB channel structure size. This size is
* depends on the number of streams within a channel, which depends on
* the number of possible CPUs on the system.
*/
-#define LTTNG_UST_CHANNEL_DATA_MAX_LEN 1048576U
-struct lttng_ust_channel {
+#define LTTNG_UST_ABI_CHANNEL_DATA_MAX_LEN 1048576U
+struct lttng_ust_abi_channel {
uint64_t len;
- enum lttng_ust_chan_type type;
- char padding[LTTNG_UST_CHANNEL_PADDING];
+ int32_t type; /* enum lttng_ust_abi_chan_type */
+ char padding[LTTNG_UST_ABI_CHANNEL_PADDING];
char data[]; /* variable sized data */
} LTTNG_PACKED;
-#define LTTNG_UST_STREAM_PADDING1 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_stream {
+#define LTTNG_UST_ABI_STREAM_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_stream {
uint64_t len; /* shm len */
uint32_t stream_nr; /* stream number */
- char padding[LTTNG_UST_STREAM_PADDING1];
+ char padding[LTTNG_UST_ABI_STREAM_PADDING1];
/*
* shm_fd and wakeup_fd are send over unix socket as file
* descriptors after this structure.
*/
} LTTNG_PACKED;
-#define LTTNG_UST_COUNTER_DIMENSION_MAX 4
+#define LTTNG_UST_ABI_COUNTER_DIMENSION_MAX 4
-enum lttng_ust_counter_arithmetic {
- LTTNG_UST_COUNTER_ARITHMETIC_MODULAR = 0,
- LTTNG_UST_COUNTER_ARITHMETIC_SATURATION = 1,
+enum lttng_ust_abi_counter_arithmetic {
+ LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR = 0,
+ LTTNG_UST_ABI_COUNTER_ARITHMETIC_SATURATION = 1,
};
-enum lttng_ust_counter_bitness {
- LTTNG_UST_COUNTER_BITNESS_32 = 0,
- LTTNG_UST_COUNTER_BITNESS_64 = 1,
+enum lttng_ust_abi_counter_bitness {
+ LTTNG_UST_ABI_COUNTER_BITNESS_32 = 0,
+ LTTNG_UST_ABI_COUNTER_BITNESS_64 = 1,
};
-struct lttng_ust_counter_dimension {
+struct lttng_ust_abi_counter_dimension {
uint64_t size;
uint64_t underflow_index;
uint64_t overflow_index;
uint8_t has_overflow;
} LTTNG_PACKED;
-#define LTTNG_UST_COUNTER_CONF_PADDING1 67
-struct lttng_ust_counter_conf {
+#define LTTNG_UST_ABI_COUNTER_CONF_PADDING1 67
+struct lttng_ust_abi_counter_conf {
uint32_t arithmetic; /* enum lttng_ust_counter_arithmetic */
uint32_t bitness; /* enum lttng_ust_counter_bitness */
uint32_t number_dimensions;
int64_t global_sum_step;
- struct lttng_ust_counter_dimension dimensions[LTTNG_UST_COUNTER_DIMENSION_MAX];
+ struct lttng_ust_abi_counter_dimension dimensions[LTTNG_UST_ABI_COUNTER_DIMENSION_MAX];
uint8_t coalesce_hits;
- char padding[LTTNG_UST_COUNTER_CONF_PADDING1];
+ char padding[LTTNG_UST_ABI_COUNTER_CONF_PADDING1];
} LTTNG_PACKED;
-struct lttng_ust_counter_value {
+struct lttng_ust_abi_counter_value {
uint32_t number_dimensions;
- uint64_t dimension_indexes[LTTNG_UST_COUNTER_DIMENSION_MAX];
+ uint64_t dimension_indexes[LTTNG_UST_ABI_COUNTER_DIMENSION_MAX];
int64_t value;
} LTTNG_PACKED;
-#define LTTNG_UST_EVENT_PADDING1 8
-#define LTTNG_UST_EVENT_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_event {
- enum lttng_ust_instrumentation instrumentation;
- char name[LTTNG_UST_SYM_NAME_LEN]; /* event name */
+#define LTTNG_UST_ABI_EVENT_PADDING1 8
+#define LTTNG_UST_ABI_EVENT_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_event {
+ int32_t instrumentation; /* enum lttng_ust_abi_instrumentation */
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN]; /* event name */
- enum lttng_ust_loglevel_type loglevel_type;
- int loglevel; /* value, -1: all */
+ int32_t loglevel_type; /* enum lttng_ust_abi_loglevel_type */
+ int32_t loglevel; /* value, -1: all */
uint64_t token; /* User-provided token */
- char padding[LTTNG_UST_EVENT_PADDING1];
+ char padding[LTTNG_UST_ABI_EVENT_PADDING1];
/* Per instrumentation type configuration */
union {
- char padding[LTTNG_UST_EVENT_PADDING2];
+ char padding[LTTNG_UST_ABI_EVENT_PADDING2];
} u;
} LTTNG_PACKED;
-#define LTTNG_UST_EVENT_NOTIFIER_PADDING 32
-struct lttng_ust_event_notifier {
- struct lttng_ust_event event;
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_PADDING 32
+struct lttng_ust_abi_event_notifier {
+ struct lttng_ust_abi_event event;
uint64_t error_counter_index;
- char padding[LTTNG_UST_EVENT_NOTIFIER_PADDING];
+ char padding[LTTNG_UST_ABI_EVENT_NOTIFIER_PADDING];
} LTTNG_PACKED;
-#define LTTNG_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
-struct lttng_ust_event_notifier_notification {
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
+struct lttng_ust_abi_event_notifier_notification {
uint64_t token;
uint16_t capture_buf_size;
- char padding[LTTNG_EVENT_NOTIFIER_NOTIFICATION_PADDING];
+ char padding[LTTNG_UST_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING];
} LTTNG_PACKED;
-#define LTTNG_UST_COUNTER_PADDING1 (LTTNG_UST_SYM_NAME_LEN + 32)
-#define LTTNG_UST_COUNTER_DATA_MAX_LEN 4096U
-struct lttng_ust_counter {
+#define LTTNG_UST_ABI_COUNTER_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+#define LTTNG_UST_ABI_COUNTER_DATA_MAX_LEN 4096U
+struct lttng_ust_abi_counter {
uint64_t len;
- char padding[LTTNG_UST_COUNTER_PADDING1];
+ char padding[LTTNG_UST_ABI_COUNTER_PADDING1];
char data[]; /* variable sized data */
} LTTNG_PACKED;
-#define LTTNG_UST_COUNTER_GLOBAL_PADDING1 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_counter_global {
+#define LTTNG_UST_ABI_COUNTER_GLOBAL_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_counter_global {
uint64_t len; /* shm len */
- char padding[LTTNG_UST_COUNTER_GLOBAL_PADDING1];
+ char padding[LTTNG_UST_ABI_COUNTER_GLOBAL_PADDING1];
} LTTNG_PACKED;
-#define LTTNG_UST_COUNTER_CPU_PADDING1 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_counter_cpu {
+#define LTTNG_UST_ABI_COUNTER_CPU_PADDING1 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_counter_cpu {
uint64_t len; /* shm len */
uint32_t cpu_nr;
- char padding[LTTNG_UST_COUNTER_CPU_PADDING1];
+ char padding[LTTNG_UST_ABI_COUNTER_CPU_PADDING1];
} LTTNG_PACKED;
-enum lttng_ust_field_type {
- LTTNG_UST_FIELD_OTHER = 0,
- LTTNG_UST_FIELD_INTEGER = 1,
- LTTNG_UST_FIELD_ENUM = 2,
- LTTNG_UST_FIELD_FLOAT = 3,
- LTTNG_UST_FIELD_STRING = 4,
+enum lttng_ust_abi_field_type {
+ LTTNG_UST_ABI_FIELD_OTHER = 0,
+ LTTNG_UST_ABI_FIELD_INTEGER = 1,
+ LTTNG_UST_ABI_FIELD_ENUM = 2,
+ LTTNG_UST_ABI_FIELD_FLOAT = 3,
+ LTTNG_UST_ABI_FIELD_STRING = 4,
};
-#define LTTNG_UST_FIELD_ITER_PADDING (LTTNG_UST_SYM_NAME_LEN + 28)
-struct lttng_ust_field_iter {
- char event_name[LTTNG_UST_SYM_NAME_LEN];
- char field_name[LTTNG_UST_SYM_NAME_LEN];
- enum lttng_ust_field_type type;
+#define LTTNG_UST_ABI_FIELD_ITER_PADDING (LTTNG_UST_ABI_SYM_NAME_LEN + 28)
+struct lttng_ust_abi_field_iter {
+ char event_name[LTTNG_UST_ABI_SYM_NAME_LEN];
+ char field_name[LTTNG_UST_ABI_SYM_NAME_LEN];
+ int32_t type; /* enum lttng_ust_abi_field_type */
int loglevel; /* event loglevel */
int nowrite;
- char padding[LTTNG_UST_FIELD_ITER_PADDING];
+ char padding[LTTNG_UST_ABI_FIELD_ITER_PADDING];
} LTTNG_PACKED;
-enum lttng_ust_context_type {
- LTTNG_UST_CONTEXT_VTID = 0,
- LTTNG_UST_CONTEXT_VPID = 1,
- LTTNG_UST_CONTEXT_PTHREAD_ID = 2,
- LTTNG_UST_CONTEXT_PROCNAME = 3,
- LTTNG_UST_CONTEXT_IP = 4,
- LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER = 5,
- LTTNG_UST_CONTEXT_CPU_ID = 6,
- LTTNG_UST_CONTEXT_APP_CONTEXT = 7,
- LTTNG_UST_CONTEXT_CGROUP_NS = 8,
- LTTNG_UST_CONTEXT_IPC_NS = 9,
- LTTNG_UST_CONTEXT_MNT_NS = 10,
- LTTNG_UST_CONTEXT_NET_NS = 11,
- LTTNG_UST_CONTEXT_PID_NS = 12,
- LTTNG_UST_CONTEXT_USER_NS = 13,
- LTTNG_UST_CONTEXT_UTS_NS = 14,
- LTTNG_UST_CONTEXT_VUID = 15,
- LTTNG_UST_CONTEXT_VEUID = 16,
- LTTNG_UST_CONTEXT_VSUID = 17,
- LTTNG_UST_CONTEXT_VGID = 18,
- LTTNG_UST_CONTEXT_VEGID = 19,
- LTTNG_UST_CONTEXT_VSGID = 20,
- LTTNG_UST_CONTEXT_TIME_NS = 21,
+enum lttng_ust_abi_context_type {
+ LTTNG_UST_ABI_CONTEXT_VTID = 0,
+ LTTNG_UST_ABI_CONTEXT_VPID = 1,
+ LTTNG_UST_ABI_CONTEXT_PTHREAD_ID = 2,
+ LTTNG_UST_ABI_CONTEXT_PROCNAME = 3,
+ LTTNG_UST_ABI_CONTEXT_IP = 4,
+ LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER = 5,
+ LTTNG_UST_ABI_CONTEXT_CPU_ID = 6,
+ LTTNG_UST_ABI_CONTEXT_APP_CONTEXT = 7,
+ LTTNG_UST_ABI_CONTEXT_CGROUP_NS = 8,
+ LTTNG_UST_ABI_CONTEXT_IPC_NS = 9,
+ LTTNG_UST_ABI_CONTEXT_MNT_NS = 10,
+ LTTNG_UST_ABI_CONTEXT_NET_NS = 11,
+ LTTNG_UST_ABI_CONTEXT_PID_NS = 12,
+ LTTNG_UST_ABI_CONTEXT_USER_NS = 13,
+ LTTNG_UST_ABI_CONTEXT_UTS_NS = 14,
+ LTTNG_UST_ABI_CONTEXT_VUID = 15,
+ LTTNG_UST_ABI_CONTEXT_VEUID = 16,
+ LTTNG_UST_ABI_CONTEXT_VSUID = 17,
+ LTTNG_UST_ABI_CONTEXT_VGID = 18,
+ LTTNG_UST_ABI_CONTEXT_VEGID = 19,
+ LTTNG_UST_ABI_CONTEXT_VSGID = 20,
+ LTTNG_UST_ABI_CONTEXT_TIME_NS = 21,
};
-struct lttng_ust_perf_counter_ctx {
+struct lttng_ust_abi_perf_counter_ctx {
uint32_t type;
uint64_t config;
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
} LTTNG_PACKED;
-#define LTTNG_UST_CONTEXT_PADDING1 16
-#define LTTNG_UST_CONTEXT_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_context {
- enum lttng_ust_context_type ctx;
- char padding[LTTNG_UST_CONTEXT_PADDING1];
+#define LTTNG_UST_ABI_CONTEXT_PADDING1 16
+#define LTTNG_UST_ABI_CONTEXT_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_context {
+ int32_t ctx; /* enum lttng_ust_abi_context_type */
+ char padding[LTTNG_UST_ABI_CONTEXT_PADDING1];
union {
- struct lttng_ust_perf_counter_ctx perf_counter;
+ struct lttng_ust_abi_perf_counter_ctx perf_counter;
struct {
/* Includes trailing '\0'. */
uint32_t provider_name_len;
uint32_t ctx_name_len;
} app_ctx;
- char padding[LTTNG_UST_CONTEXT_PADDING2];
+ char padding[LTTNG_UST_ABI_CONTEXT_PADDING2];
} u;
} LTTNG_PACKED;
/*
* Tracer channel attributes.
*/
-#define LTTNG_UST_CHANNEL_ATTR_PADDING (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_channel_attr {
+#define LTTNG_UST_ABI_CHANNEL_ATTR_PADDING (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_channel_attr {
uint64_t subbuf_size; /* bytes */
uint64_t num_subbuf; /* power of 2 */
int overwrite; /* 1: overwrite, 0: discard */
unsigned int switch_timer_interval; /* usec */
unsigned int read_timer_interval; /* usec */
- enum lttng_ust_output output; /* splice, mmap */
+ int32_t output; /* enum lttng_ust_abi_output */
union {
struct {
int64_t blocking_timeout; /* Blocking timeout (usec) */
} s;
- char padding[LTTNG_UST_CHANNEL_ATTR_PADDING];
+ char padding[LTTNG_UST_ABI_CHANNEL_ATTR_PADDING];
} u;
} LTTNG_PACKED;
-#define LTTNG_UST_TRACEPOINT_ITER_PADDING 16
-struct lttng_ust_tracepoint_iter {
- char name[LTTNG_UST_SYM_NAME_LEN]; /* provider:name */
+#define LTTNG_UST_ABI_TRACEPOINT_ITER_PADDING 16
+struct lttng_ust_abi_tracepoint_iter {
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN]; /* provider:name */
int loglevel;
- char padding[LTTNG_UST_TRACEPOINT_ITER_PADDING];
+ char padding[LTTNG_UST_ABI_TRACEPOINT_ITER_PADDING];
} LTTNG_PACKED;
-enum lttng_ust_object_type {
- LTTNG_UST_OBJECT_TYPE_UNKNOWN = -1,
- LTTNG_UST_OBJECT_TYPE_CHANNEL = 0,
- LTTNG_UST_OBJECT_TYPE_STREAM = 1,
- LTTNG_UST_OBJECT_TYPE_EVENT = 2,
- LTTNG_UST_OBJECT_TYPE_CONTEXT = 3,
- LTTNG_UST_OBJECT_TYPE_EVENT_NOTIFIER_GROUP = 4,
- LTTNG_UST_OBJECT_TYPE_EVENT_NOTIFIER = 5,
- LTTNG_UST_OBJECT_TYPE_COUNTER = 6,
- LTTNG_UST_OBJECT_TYPE_COUNTER_GLOBAL = 7,
- LTTNG_UST_OBJECT_TYPE_COUNTER_CPU = 8,
+enum lttng_ust_abi_object_type {
+ LTTNG_UST_ABI_OBJECT_TYPE_UNKNOWN = -1,
+ LTTNG_UST_ABI_OBJECT_TYPE_CHANNEL = 0,
+ LTTNG_UST_ABI_OBJECT_TYPE_STREAM = 1,
+ LTTNG_UST_ABI_OBJECT_TYPE_EVENT = 2,
+ LTTNG_UST_ABI_OBJECT_TYPE_CONTEXT = 3,
+ LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER_GROUP = 4,
+ LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER = 5,
+ LTTNG_UST_ABI_OBJECT_TYPE_COUNTER = 6,
+ LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_GLOBAL = 7,
+ LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_CPU = 8,
};
-#define LTTNG_UST_OBJECT_DATA_PADDING1 32
-#define LTTNG_UST_OBJECT_DATA_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
+#define LTTNG_UST_ABI_OBJECT_DATA_PADDING1 32
+#define LTTNG_UST_ABI_OBJECT_DATA_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
-struct lttng_ust_object_data {
- enum lttng_ust_object_type type;
+struct lttng_ust_abi_object_data {
+ int32_t type; /* enum lttng_ust_abi_object_type */
int handle;
uint64_t size;
- char padding1[LTTNG_UST_OBJECT_DATA_PADDING1];
+ char padding1[LTTNG_UST_ABI_OBJECT_DATA_PADDING1];
union {
struct {
void *data;
- enum lttng_ust_chan_type type;
+ int32_t type; /* enum lttng_ust_abi_chan_type */
int wakeup_fd;
} channel;
struct {
int shm_fd;
uint32_t cpu_nr;
} counter_cpu;
- char padding2[LTTNG_UST_OBJECT_DATA_PADDING2];
+ char padding2[LTTNG_UST_ABI_OBJECT_DATA_PADDING2];
} u;
} LTTNG_PACKED;
enum lttng_ust_calibrate_type {
- LTTNG_UST_CALIBRATE_TRACEPOINT,
+ LTTNG_UST_ABI_CALIBRATE_TRACEPOINT,
};
-#define LTTNG_UST_CALIBRATE_PADDING1 16
-#define LTTNG_UST_CALIBRATE_PADDING2 (LTTNG_UST_SYM_NAME_LEN + 32)
-struct lttng_ust_calibrate {
+#define LTTNG_UST_ABI_CALIBRATE_PADDING1 16
+#define LTTNG_UST_ABI_CALIBRATE_PADDING2 (LTTNG_UST_ABI_SYM_NAME_LEN + 32)
+struct lttng_ust_abi_calibrate {
enum lttng_ust_calibrate_type type; /* type (input) */
- char padding[LTTNG_UST_CALIBRATE_PADDING1];
+ char padding[LTTNG_UST_ABI_CALIBRATE_PADDING1];
union {
- char padding[LTTNG_UST_CALIBRATE_PADDING2];
+ char padding[LTTNG_UST_ABI_CALIBRATE_PADDING2];
} u;
} LTTNG_PACKED;
-#define FILTER_BYTECODE_MAX_LEN 65536
-#define LTTNG_UST_FILTER_PADDING 32
-struct lttng_ust_filter_bytecode {
+#define LTTNG_UST_ABI_FILTER_BYTECODE_MAX_LEN 65536
+#define LTTNG_UST_ABI_FILTER_PADDING 32
+struct lttng_ust_abi_filter_bytecode {
uint32_t len;
uint32_t reloc_offset;
uint64_t seqnum;
- char padding[LTTNG_UST_FILTER_PADDING];
+ char padding[LTTNG_UST_ABI_FILTER_PADDING];
char data[0];
} LTTNG_PACKED;
-#define CAPTURE_BYTECODE_MAX_LEN 65536
-#define LTTNG_UST_CAPTURE_PADDING 32
-struct lttng_ust_capture_bytecode {
+#define LTTNG_UST_ABI_CAPTURE_BYTECODE_MAX_LEN 65536
+#define LTTNG_UST_ABI_CAPTURE_PADDING 32
+struct lttng_ust_abi_capture_bytecode {
uint32_t len;
uint32_t reloc_offset;
uint64_t seqnum;
- char padding[LTTNG_UST_CAPTURE_PADDING];
+ char padding[LTTNG_UST_ABI_CAPTURE_PADDING];
char data[0];
} LTTNG_PACKED;
-#define LTTNG_UST_EXCLUSION_PADDING 32
-struct lttng_ust_event_exclusion {
+#define LTTNG_UST_ABI_EXCLUSION_PADDING 32
+struct lttng_ust_abi_event_exclusion {
uint32_t count;
- char padding[LTTNG_UST_EXCLUSION_PADDING];
- char names[LTTNG_UST_SYM_NAME_LEN][0];
+ char padding[LTTNG_UST_ABI_EXCLUSION_PADDING];
+ char names[LTTNG_UST_ABI_SYM_NAME_LEN][0];
} LTTNG_PACKED;
-#define _UST_CMD(minor) (minor)
-#define _UST_CMDR(minor, type) (minor)
-#define _UST_CMDW(minor, type) (minor)
+#define LTTNG_UST_ABI_CMD(minor) (minor)
+#define LTTNG_UST_ABI_CMDR(minor, type) (minor)
+#define LTTNG_UST_ABI_CMDW(minor, type) (minor)
/* Handled by object descriptor */
-#define LTTNG_UST_RELEASE _UST_CMD(0x1)
+#define LTTNG_UST_ABI_RELEASE LTTNG_UST_ABI_CMD(0x1)
/* Handled by object cmd */
/* LTTng-UST commands */
-#define LTTNG_UST_SESSION _UST_CMD(0x40)
-#define LTTNG_UST_TRACER_VERSION \
- _UST_CMDR(0x41, struct lttng_ust_tracer_version)
-#define LTTNG_UST_TRACEPOINT_LIST _UST_CMD(0x42)
-#define LTTNG_UST_WAIT_QUIESCENT _UST_CMD(0x43)
-#define LTTNG_UST_REGISTER_DONE _UST_CMD(0x44)
-#define LTTNG_UST_TRACEPOINT_FIELD_LIST _UST_CMD(0x45)
-#define LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE _UST_CMD(0x46)
+#define LTTNG_UST_ABI_SESSION LTTNG_UST_ABI_CMD(0x40)
+#define LTTNG_UST_ABI_TRACER_VERSION \
+ LTTNG_UST_ABI_CMDR(0x41, struct lttng_ust_abi_tracer_version)
+#define LTTNG_UST_ABI_TRACEPOINT_LIST LTTNG_UST_ABI_CMD(0x42)
+#define LTTNG_UST_ABI_WAIT_QUIESCENT LTTNG_UST_ABI_CMD(0x43)
+#define LTTNG_UST_ABI_REGISTER_DONE LTTNG_UST_ABI_CMD(0x44)
+#define LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST LTTNG_UST_ABI_CMD(0x45)
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE \
+ LTTNG_UST_ABI_CMD(0x46)
/* Session commands */
-#define LTTNG_UST_CHANNEL \
- _UST_CMDW(0x51, struct lttng_ust_channel)
-#define LTTNG_UST_SESSION_START _UST_CMD(0x52)
-#define LTTNG_UST_SESSION_STOP _UST_CMD(0x53)
-#define LTTNG_UST_SESSION_STATEDUMP _UST_CMD(0x54)
+#define LTTNG_UST_ABI_CHANNEL \
+ LTTNG_UST_ABI_CMDW(0x51, struct lttng_ust_abi_channel)
+#define LTTNG_UST_ABI_SESSION_START LTTNG_UST_ABI_CMD(0x52)
+#define LTTNG_UST_ABI_SESSION_STOP LTTNG_UST_ABI_CMD(0x53)
+#define LTTNG_UST_ABI_SESSION_STATEDUMP LTTNG_UST_ABI_CMD(0x54)
/* Channel commands */
-#define LTTNG_UST_STREAM _UST_CMD(0x60)
-#define LTTNG_UST_EVENT \
- _UST_CMDW(0x61, struct lttng_ust_event)
+#define LTTNG_UST_ABI_STREAM LTTNG_UST_ABI_CMD(0x60)
+#define LTTNG_UST_ABI_EVENT \
+ LTTNG_UST_ABI_CMDW(0x61, struct lttng_ust_abi_event)
/* Event and channel commands */
-#define LTTNG_UST_CONTEXT \
- _UST_CMDW(0x70, struct lttng_ust_context)
-#define LTTNG_UST_FLUSH_BUFFER \
- _UST_CMD(0x71)
+#define LTTNG_UST_ABI_CONTEXT \
+ LTTNG_UST_ABI_CMDW(0x70, struct lttng_ust_abi_context)
+#define LTTNG_UST_ABI_FLUSH_BUFFER \
+ LTTNG_UST_ABI_CMD(0x71)
/* Event, event notifier, channel and session commands */
-#define LTTNG_UST_ENABLE _UST_CMD(0x80)
-#define LTTNG_UST_DISABLE _UST_CMD(0x81)
+#define LTTNG_UST_ABI_ENABLE LTTNG_UST_ABI_CMD(0x80)
+#define LTTNG_UST_ABI_DISABLE LTTNG_UST_ABI_CMD(0x81)
/* Tracepoint list commands */
-#define LTTNG_UST_TRACEPOINT_LIST_GET _UST_CMD(0x90)
-#define LTTNG_UST_TRACEPOINT_FIELD_LIST_GET _UST_CMD(0x91)
+#define LTTNG_UST_ABI_TRACEPOINT_LIST_GET LTTNG_UST_ABI_CMD(0x90)
+#define LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST_GET LTTNG_UST_ABI_CMD(0x91)
/* Event and event notifier commands */
-#define LTTNG_UST_FILTER _UST_CMD(0xA0)
-#define LTTNG_UST_EXCLUSION _UST_CMD(0xA1)
+#define LTTNG_UST_ABI_FILTER LTTNG_UST_ABI_CMD(0xA0)
+#define LTTNG_UST_ABI_EXCLUSION LTTNG_UST_ABI_CMD(0xA1)
/* Event notifier group commands */
-#define LTTNG_UST_EVENT_NOTIFIER_CREATE \
- _UST_CMDW(0xB0, struct lttng_ust_event_notifier)
+#define LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE \
+ LTTNG_UST_ABI_CMDW(0xB0, struct lttng_ust_abi_event_notifier)
/* Event notifier commands */
-#define LTTNG_UST_CAPTURE _UST_CMD(0xB6)
+#define LTTNG_UST_ABI_CAPTURE LTTNG_UST_ABI_CMD(0xB6)
/* Session and event notifier group commands */
-#define LTTNG_UST_COUNTER \
- _UST_CMDW(0xC0, struct lttng_ust_counter)
+#define LTTNG_UST_ABI_COUNTER \
+ LTTNG_UST_ABI_CMDW(0xC0, struct lttng_ust_abi_counter)
/* Counter commands */
-#define LTTNG_UST_COUNTER_GLOBAL \
- _UST_CMDW(0xD0, struct lttng_ust_counter_global)
-#define LTTNG_UST_COUNTER_CPU \
- _UST_CMDW(0xD1, struct lttng_ust_counter_cpu)
-
-#define LTTNG_UST_ROOT_HANDLE 0
-
-struct lttng_ust_obj;
-
-union ust_args {
- struct {
- void *chan_data;
- int wakeup_fd;
- } channel;
- struct {
- int shm_fd;
- int wakeup_fd;
- } stream;
- struct {
- struct lttng_ust_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_objd_ops {
- long (*cmd)(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *args, void *owner);
- int (*release)(int objd);
-};
-
-/* Create root handle. Always ID 0. */
-int lttng_abi_create_root_handle(void);
-
-const struct lttng_ust_objd_ops *objd_ops(int id);
-int lttng_ust_objd_unref(int id, int is_owner);
+#define LTTNG_UST_ABI_COUNTER_GLOBAL \
+ LTTNG_UST_ABI_CMDW(0xD0, struct lttng_ust_abi_counter_global)
+#define LTTNG_UST_ABI_COUNTER_CPU \
+ LTTNG_UST_ABI_CMDW(0xD1, struct lttng_ust_abi_counter_cpu)
-void lttng_ust_abi_exit(void);
-void lttng_ust_events_exit(void);
-void lttng_ust_objd_table_owner_cleanup(void *owner);
+#define LTTNG_UST_ABI_ROOT_HANDLE 0
#endif /* _LTTNG_UST_ABI_H */
struct lttng_ust_lib_ring_buffer;
struct ustctl_consumer_channel_attr {
- enum lttng_ust_chan_type type;
+ enum lttng_ust_abi_chan_type type;
uint64_t subbuf_size; /* bytes */
uint64_t num_subbuf; /* power of 2 */
int overwrite; /* 1: overwrite, 0: discard */
unsigned int switch_timer_interval; /* usec */
unsigned int read_timer_interval; /* usec */
- enum lttng_ust_output output; /* splice, mmap */
+ enum lttng_ust_abi_output output; /* splice, mmap */
uint32_t chan_id; /* channel ID */
unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
int64_t blocking_timeout; /* Blocking timeout (usec) */
*/
struct lttng_ust_context_attr {
- enum lttng_ust_context_type ctx;
+ enum lttng_ust_abi_context_type ctx;
union {
- struct lttng_ust_perf_counter_ctx perf_counter;
+ struct lttng_ust_abi_perf_counter_ctx perf_counter;
struct {
char *provider_name;
char *ctx_name;
*/
int ustctl_register_done(int sock);
int ustctl_create_session(int sock);
-int ustctl_create_event(int sock, struct lttng_ust_event *ev,
- struct lttng_ust_object_data *channel_data,
- struct lttng_ust_object_data **event_data);
+int ustctl_create_event(int sock, struct lttng_ust_abi_event *ev,
+ struct lttng_ust_abi_object_data *channel_data,
+ struct lttng_ust_abi_object_data **event_data);
int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
- struct lttng_ust_object_data *obj_data,
- struct lttng_ust_object_data **context_data);
-int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode,
- struct lttng_ust_object_data *obj_data);
-int ustctl_set_capture(int sock, struct lttng_ust_capture_bytecode *bytecode,
- struct lttng_ust_object_data *obj_data);
-int ustctl_set_exclusion(int sock, struct lttng_ust_event_exclusion *exclusion,
- struct lttng_ust_object_data *obj_data);
-
-int ustctl_enable(int sock, struct lttng_ust_object_data *object);
-int ustctl_disable(int sock, struct lttng_ust_object_data *object);
+ struct lttng_ust_abi_object_data *obj_data,
+ struct lttng_ust_abi_object_data **context_data);
+int ustctl_set_filter(int sock, struct lttng_ust_abi_filter_bytecode *bytecode,
+ struct lttng_ust_abi_object_data *obj_data);
+int ustctl_set_capture(int sock, struct lttng_ust_abi_capture_bytecode *bytecode,
+ struct lttng_ust_abi_object_data *obj_data);
+int ustctl_set_exclusion(int sock, struct lttng_ust_abi_event_exclusion *exclusion,
+ struct lttng_ust_abi_object_data *obj_data);
+
+int ustctl_enable(int sock, struct lttng_ust_abi_object_data *object);
+int ustctl_disable(int sock, struct lttng_ust_abi_object_data *object);
int ustctl_start_session(int sock, int handle);
int ustctl_stop_session(int sock, int handle);
* notifier in that group.
*/
int ustctl_create_event_notifier_group(int sock, int pipe_fd,
- struct lttng_ust_object_data **event_notifier_group);
+ struct lttng_ust_abi_object_data **event_notifier_group);
/*
* ustctl_create_event notifier creates a event notifier in a event notifier
* notifier.
*/
int ustctl_create_event_notifier(int sock,
- struct lttng_ust_event_notifier *event_notifier,
- struct lttng_ust_object_data *event_notifier_group,
- struct lttng_ust_object_data **event_notifier_data);
+ struct lttng_ust_abi_event_notifier *event_notifier,
+ struct lttng_ust_abi_object_data *event_notifier_group,
+ struct lttng_ust_abi_object_data **event_notifier_data);
/*
* ustctl_tracepoint_list returns a tracepoint list handle, or negative
* returned.
*/
int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
- struct lttng_ust_tracepoint_iter *iter);
+ struct lttng_ust_abi_tracepoint_iter *iter);
/*
* ustctl_tracepoint_field_list returns a tracepoint field list handle,
* returned.
*/
int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
- struct lttng_ust_field_iter *iter);
+ struct lttng_ust_abi_field_iter *iter);
-int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v);
+int ustctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v);
int ustctl_wait_quiescent(int sock);
-int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object);
+int ustctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object);
-int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
+int ustctl_calibrate(int sock, struct lttng_ust_abi_calibrate *calibrate);
/* Release object created by members of this API. */
-int ustctl_release_object(int sock, struct lttng_ust_object_data *data);
+int ustctl_release_object(int sock, struct lttng_ust_abi_object_data *data);
/* Release handle returned by create session. */
int ustctl_release_handle(int sock, int handle);
int ustctl_recv_channel_from_consumer(int sock,
- struct lttng_ust_object_data **channel_data);
+ struct lttng_ust_abi_object_data **channel_data);
int ustctl_recv_stream_from_consumer(int sock,
- struct lttng_ust_object_data **stream_data);
+ struct lttng_ust_abi_object_data **stream_data);
int ustctl_send_channel_to_ust(int sock, int session_handle,
- struct lttng_ust_object_data *channel_data);
+ struct lttng_ust_abi_object_data *channel_data);
int ustctl_send_stream_to_ust(int sock,
- struct lttng_ust_object_data *channel_data,
- struct lttng_ust_object_data *stream_data);
+ struct lttng_ust_abi_object_data *channel_data,
+ struct lttng_ust_abi_object_data *stream_data);
/*
* ustctl_duplicate_ust_object_data allocated a new object in "dest" if
* it succeeds (returns 0). It must be released using
* ustctl_release_object() and then freed with free().
*/
-int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest,
- struct lttng_ust_object_data *src);
+int ustctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
+ struct lttng_ust_abi_object_data *src);
/*
* API used by consumer.
#define USTCTL_UST_ENUM_ENTRY_PADDING 32
struct ustctl_enum_entry {
struct ustctl_enum_value start, end; /* start and end are inclusive */
- char string[LTTNG_UST_SYM_NAME_LEN];
+ char string[LTTNG_UST_ABI_SYM_NAME_LEN];
union {
struct {
uint32_t options;
union _ustctl_basic_type {
struct ustctl_integer_type integer;
struct {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct ustctl_integer_type container_type;
uint64_t id; /* enum ID in sessiond. */
} enumeration;
int32_t encoding; /* enum ustctl_string_encodings */
} string;
struct {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint64_t id; /* enum ID in sessiond. */
/* container_type follows after this struct ustctl_field. */
} enum_nestable;
/* elem_type follows after this struct ustctl_field. */
} array_nestable;
struct {
- char length_name[LTTNG_UST_SYM_NAME_LEN];
+ char length_name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint32_t alignment; /* Alignment before elements. */
/* elem_type follows after the length_type. */
} sequence_nestable;
} struct_nestable;
struct {
uint32_t nr_choices;
- char tag_name[LTTNG_UST_SYM_NAME_LEN];
+ char tag_name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint32_t alignment;
/* Followed by nr_choices struct ustctl_field. */
} variant_nestable;
} _struct;
struct {
uint32_t nr_choices;
- char tag_name[LTTNG_UST_SYM_NAME_LEN];
+ char tag_name[LTTNG_UST_ABI_SYM_NAME_LEN];
/* Followed by nr_choices struct ustctl_field. */
} variant;
} legacy;
#define USTCTL_UST_FIELD_PADDING 28
struct ustctl_field {
- char name[LTTNG_UST_SYM_NAME_LEN];
+ char name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct ustctl_type type;
char padding[USTCTL_UST_FIELD_PADDING];
} LTTNG_PACKED;
int *channel_objd, /* channel descriptor (output) */
char *event_name, /*
* event name (output,
- * size LTTNG_UST_SYM_NAME_LEN)
+ * size LTTNG_UST_ABI_SYM_NAME_LEN)
*/
int *loglevel,
char **signature, /*
bool coalesce_hits);
int ustctl_create_counter_data(struct ustctl_daemon_counter *counter,
- struct lttng_ust_object_data **counter_data);
+ struct lttng_ust_abi_object_data **counter_data);
int ustctl_create_counter_global_data(struct ustctl_daemon_counter *counter,
- struct lttng_ust_object_data **counter_global_data);
+ struct lttng_ust_abi_object_data **counter_global_data);
int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cpu,
- struct lttng_ust_object_data **counter_cpu_data);
+ struct lttng_ust_abi_object_data **counter_cpu_data);
/*
* Each counter data and counter cpu data created need to be destroyed
void ustctl_destroy_counter(struct ustctl_daemon_counter *counter);
int ustctl_send_counter_data_to_ust(int sock, int parent_handle,
- struct lttng_ust_object_data *counter_data);
+ struct lttng_ust_abi_object_data *counter_data);
int ustctl_send_counter_global_data_to_ust(int sock,
- struct lttng_ust_object_data *counter_data,
- struct lttng_ust_object_data *counter_global_data);
+ struct lttng_ust_abi_object_data *counter_data,
+ struct lttng_ust_abi_object_data *counter_global_data);
int ustctl_send_counter_cpu_data_to_ust(int sock,
- struct lttng_ust_object_data *counter_data,
- struct lttng_ust_object_data *counter_cpu_data);
+ struct lttng_ust_abi_object_data *counter_data,
+ struct lttng_ust_abi_object_data *counter_cpu_data);
int ustctl_counter_read(struct ustctl_daemon_counter *counter,
const size_t *dimension_indexes,
/* Channel ID */
unsigned int id;
- enum lttng_ust_chan_type type;
+ enum lttng_ust_abi_chan_type type;
unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */
int tstate:1; /* Transient enable state */
};
#undef _TRACEPOINT_EVENT_INSTANCE
#define _TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args) \
static const char \
- __tp_name_len_check##_provider##___##_name[LTTNG_UST_SYM_NAME_LEN] \
+ __tp_name_len_check##_provider##___##_name[LTTNG_UST_ABI_SYM_NAME_LEN] \
__attribute__((unused)) = \
#_provider ":" #_name;
uint32_t cmd;
char padding[USTCOMM_MSG_PADDING1];
union {
- struct lttng_ust_channel channel;
- struct lttng_ust_stream stream;
- struct lttng_ust_event event;
- struct lttng_ust_context context;
- struct lttng_ust_tracer_version version;
- struct lttng_ust_tracepoint_iter tracepoint;
+ struct lttng_ust_abi_channel channel;
+ struct lttng_ust_abi_stream stream;
+ struct lttng_ust_abi_event event;
+ struct lttng_ust_abi_context context;
+ struct lttng_ust_abi_tracer_version version;
+ struct lttng_ust_abi_tracepoint_iter tracepoint;
struct {
uint32_t data_size; /* following filter data */
uint32_t reloc_offset;
uint32_t reloc_offset;
uint64_t seqnum;
} LTTNG_PACKED capture;
- struct lttng_ust_counter counter;
- struct lttng_ust_counter_global counter_global;
- struct lttng_ust_counter_cpu counter_cpu;
+ struct lttng_ust_abi_counter counter;
+ struct lttng_ust_abi_counter_global counter_global;
+ struct lttng_ust_abi_counter_cpu counter_cpu;
/*
- * For LTTNG_UST_EVENT_NOTIFIER_CREATE, a struct
- * lttng_ust_event_notifier implicitly follows struct
+ * For lttng_ust_abi_EVENT_NOTIFIER_CREATE, a struct
+ * lttng_ust_abi_event_notifier implicitly follows struct
* ustcomm_ust_msg.
*/
struct {
- /* Length of struct lttng_ust_event_notifier */
+ /* Length of struct lttng_ust_abi_event_notifier */
uint32_t len;
} event_notifier;
char padding[USTCOMM_MSG_PADDING2];
struct {
uint64_t memory_map_size;
} LTTNG_PACKED stream;
- struct lttng_ust_tracer_version version;
- struct lttng_ust_tracepoint_iter tracepoint;
+ struct lttng_ust_abi_tracer_version version;
+ struct lttng_ust_abi_tracepoint_iter tracepoint;
char padding[USTCOMM_REPLY_PADDING2];
} u;
} LTTNG_PACKED;
struct ustcomm_notify_event_msg {
uint32_t session_objd;
uint32_t channel_objd;
- char event_name[LTTNG_UST_SYM_NAME_LEN];
+ char event_name[LTTNG_UST_ABI_SYM_NAME_LEN];
int32_t loglevel;
uint32_t signature_len;
uint32_t fields_len;
#define USTCOMM_NOTIFY_ENUM_MSG_PADDING 32
struct ustcomm_notify_enum_msg {
uint32_t session_objd;
- char enum_name[LTTNG_UST_SYM_NAME_LEN];
+ char enum_name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint32_t entries_len;
char padding[USTCOMM_NOTIFY_ENUM_MSG_PADDING];
/* followed by enum entries */
ssize_t len, nr_fd;
int wakeup_fd, ret;
- if (var_len > LTTNG_UST_CHANNEL_DATA_MAX_LEN) {
+ if (var_len > LTTNG_UST_ABI_CHANNEL_DATA_MAX_LEN) {
len = -EINVAL;
goto error_check;
}
void *counter_data;
ssize_t len;
- if (var_len > LTTNG_UST_COUNTER_DATA_MAX_LEN) {
+ if (var_len > LTTNG_UST_ABI_COUNTER_DATA_MAX_LEN) {
len = -EINVAL;
goto error_check;
}
ssize_t len;
struct ustctl_reg_msg reg_msg;
- reg_msg.magic = LTTNG_UST_COMM_MAGIC;
+ reg_msg.magic = LTTNG_UST_ABI_COMM_MAGIC;
reg_msg.major = LTTNG_UST_ABI_MAJOR_VERSION;
reg_msg.minor = LTTNG_UST_ABI_MINOR_VERSION;
reg_msg.pid = getpid();
const char *field_name)
{
const struct lttng_event_field *choices;
- char tag_field_name[LTTNG_UST_SYM_NAME_LEN];
+ char tag_field_name[LTTNG_UST_ABI_SYM_NAME_LEN];
const struct lttng_type *tag_type;
const struct lttng_event_field *tag_field_generic;
struct lttng_event_field tag_field = {
tag_type = &tag_field_generic->type;
/* Serialize enum field. */
- strncpy(tag_field_name, field_name, LTTNG_UST_SYM_NAME_LEN);
- tag_field_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(tag_field_name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ tag_field_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
strncat(tag_field_name,
"_tag",
- LTTNG_UST_SYM_NAME_LEN - strlen(tag_field_name) - 1);
+ LTTNG_UST_ABI_SYM_NAME_LEN - strlen(tag_field_name) - 1);
tag_field.type = *tag_type;
ret = serialize_one_field(session, fields, iter_output,
&tag_field);
if (ret)
return ret;
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
uf->type.atype = ustctl_atype_variant;
uf->type.u.variant_nestable.nr_choices = nr_choices;
strncpy(uf->type.u.variant_nestable.tag_name,
tag_field_name,
- LTTNG_UST_SYM_NAME_LEN);
- uf->type.u.variant_nestable.tag_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->type.u.variant_nestable.tag_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
uf->type.u.variant_nestable.alignment = 0;
(*iter_output)++;
struct ustctl_type *ut = &uf->type;
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
const struct lttng_float_type *lft;
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
int32_t encoding;
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
struct ustctl_type *ut = &uf->type;
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
struct ustctl_type *ut = &uf->type;
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
ut->atype = ustctl_atype_sequence_nestable;
strncpy(ut->u.sequence_nestable.length_name,
lt->u.sequence_nestable.length_name,
- LTTNG_UST_SYM_NAME_LEN);
- ut->u.sequence_nestable.length_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ ut->u.sequence_nestable.length_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
ut->u.sequence_nestable.alignment = lt->u.sequence_nestable.alignment;
(*iter_output)++;
struct ustctl_field *uf = &fields[*iter_output];
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
struct ustctl_type *ut = &uf->type;
if (field_name) {
- strncpy(uf->name, field_name, LTTNG_UST_SYM_NAME_LEN);
- uf->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uf->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
} else {
uf->name[0] = '\0';
}
strncpy(ut->u.enum_nestable.name, lt->u.enum_nestable.desc->name,
- LTTNG_UST_SYM_NAME_LEN);
- ut->u.enum_nestable.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ ut->u.enum_nestable.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
ut->atype = ustctl_atype_enum_nestable;
(*iter_output)++;
uentry->start.signedness = lentry->start.signedness;
uentry->end.value = lentry->end.value;
uentry->end.signedness = lentry->end.signedness;
- strncpy(uentry->string, lentry->string, LTTNG_UST_SYM_NAME_LEN);
- uentry->string[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(uentry->string, lentry->string, LTTNG_UST_ABI_SYM_NAME_LEN);
+ uentry->string[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
if (lentry->u.extra.options & LTTNG_ENUM_ENTRY_OPTION_IS_AUTO) {
uentry->u.extra.options |=
msg.header.notify_cmd = USTCTL_NOTIFY_CMD_EVENT;
msg.m.session_objd = session_objd;
msg.m.channel_objd = channel_objd;
- strncpy(msg.m.event_name, event_name, LTTNG_UST_SYM_NAME_LEN);
- msg.m.event_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(msg.m.event_name, event_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ msg.m.event_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
msg.m.loglevel = loglevel;
signature_len = strlen(signature) + 1;
msg.m.signature_len = signature_len;
memset(&msg, 0, sizeof(msg));
msg.header.notify_cmd = USTCTL_NOTIFY_CMD_ENUM;
msg.m.session_objd = session_objd;
- strncpy(msg.m.enum_name, enum_name, LTTNG_UST_SYM_NAME_LEN);
- msg.m.enum_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(msg.m.enum_name, enum_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ msg.m.enum_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
/* Calculate entries len, serialize entries. */
if (nr_entries > 0) {
return 0;
memset(&lum, 0, sizeof(lum));
lum.handle = handle;
- lum.cmd = LTTNG_UST_RELEASE;
+ lum.cmd = LTTNG_UST_ABI_RELEASE;
return ustcomm_send_app_cmd(sock, &lum, &lur);
}
* If sock is negative, it means we don't have to notify the other side
* (e.g. application has already vanished).
*/
-int ustctl_release_object(int sock, struct lttng_ust_object_data *data)
+int ustctl_release_object(int sock, struct lttng_ust_abi_object_data *data)
{
int ret;
return -EINVAL;
switch (data->type) {
- case LTTNG_UST_OBJECT_TYPE_CHANNEL:
+ case LTTNG_UST_ABI_OBJECT_TYPE_CHANNEL:
if (data->u.channel.wakeup_fd >= 0) {
ret = close(data->u.channel.wakeup_fd);
if (ret < 0) {
free(data->u.channel.data);
data->u.channel.data = NULL;
break;
- case LTTNG_UST_OBJECT_TYPE_STREAM:
+ case LTTNG_UST_ABI_OBJECT_TYPE_STREAM:
if (data->u.stream.shm_fd >= 0) {
ret = close(data->u.stream.shm_fd);
if (ret < 0) {
data->u.stream.wakeup_fd = -1;
}
break;
- case LTTNG_UST_OBJECT_TYPE_EVENT:
- case LTTNG_UST_OBJECT_TYPE_CONTEXT:
- case LTTNG_UST_OBJECT_TYPE_EVENT_NOTIFIER_GROUP:
- case LTTNG_UST_OBJECT_TYPE_EVENT_NOTIFIER:
+ case LTTNG_UST_ABI_OBJECT_TYPE_EVENT:
+ case LTTNG_UST_ABI_OBJECT_TYPE_CONTEXT:
+ case LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER_GROUP:
+ case LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER:
break;
- case LTTNG_UST_OBJECT_TYPE_COUNTER:
+ case LTTNG_UST_ABI_OBJECT_TYPE_COUNTER:
free(data->u.counter.data);
data->u.counter.data = NULL;
break;
- case LTTNG_UST_OBJECT_TYPE_COUNTER_GLOBAL:
+ case LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_GLOBAL:
if (data->u.counter_global.shm_fd >= 0) {
ret = close(data->u.counter_global.shm_fd);
if (ret < 0) {
data->u.counter_global.shm_fd = -1;
}
break;
- case LTTNG_UST_OBJECT_TYPE_COUNTER_CPU:
+ case LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_CPU:
if (data->u.counter_cpu.shm_fd >= 0) {
ret = close(data->u.counter_cpu.shm_fd);
if (ret < 0) {
DBG("Sending register done command to %d", sock);
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_REGISTER_DONE;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_REGISTER_DONE;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
/* Create session */
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_SESSION;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_SESSION;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
return session_handle;
}
-int ustctl_create_event(int sock, struct lttng_ust_event *ev,
- struct lttng_ust_object_data *channel_data,
- struct lttng_ust_object_data **_event_data)
+int ustctl_create_event(int sock, struct lttng_ust_abi_event *ev,
+ struct lttng_ust_abi_object_data *channel_data,
+ struct lttng_ust_abi_object_data **_event_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
- struct lttng_ust_object_data *event_data;
+ struct lttng_ust_abi_object_data *event_data;
int ret;
if (!channel_data || !_event_data)
event_data = zmalloc(sizeof(*event_data));
if (!event_data)
return -ENOMEM;
- event_data->type = LTTNG_UST_OBJECT_TYPE_EVENT;
+ event_data->type = LTTNG_UST_ABI_OBJECT_TYPE_EVENT;
memset(&lum, 0, sizeof(lum));
lum.handle = channel_data->handle;
- lum.cmd = LTTNG_UST_EVENT;
+ lum.cmd = LTTNG_UST_ABI_EVENT;
strncpy(lum.u.event.name, ev->name,
- LTTNG_UST_SYM_NAME_LEN);
+ LTTNG_UST_ABI_SYM_NAME_LEN);
lum.u.event.instrumentation = ev->instrumentation;
lum.u.event.loglevel_type = ev->loglevel_type;
lum.u.event.loglevel = ev->loglevel;
}
int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
- struct lttng_ust_object_data *obj_data,
- struct lttng_ust_object_data **_context_data)
+ struct lttng_ust_abi_object_data *obj_data,
+ struct lttng_ust_abi_object_data **_context_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
- struct lttng_ust_object_data *context_data = NULL;
+ struct lttng_ust_abi_object_data *context_data = NULL;
char *buf = NULL;
size_t len;
int ret;
ret = -ENOMEM;
goto end;
}
- context_data->type = LTTNG_UST_OBJECT_TYPE_CONTEXT;
+ context_data->type = LTTNG_UST_ABI_OBJECT_TYPE_CONTEXT;
memset(&lum, 0, sizeof(lum));
lum.handle = obj_data->handle;
- lum.cmd = LTTNG_UST_CONTEXT;
+ lum.cmd = LTTNG_UST_ABI_CONTEXT;
lum.u.context.ctx = ctx->ctx;
switch (ctx->ctx) {
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
lum.u.context.u.perf_counter = ctx->u.perf_counter;
break;
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
{
size_t provider_name_len = strlen(
ctx->u.app_ctx.provider_name) + 1;
return ret;
}
-int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode,
- struct lttng_ust_object_data *obj_data)
+int ustctl_set_filter(int sock, struct lttng_ust_abi_filter_bytecode *bytecode,
+ struct lttng_ust_abi_object_data *obj_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = obj_data->handle;
- lum.cmd = LTTNG_UST_FILTER;
+ lum.cmd = LTTNG_UST_ABI_FILTER;
lum.u.filter.data_size = bytecode->len;
lum.u.filter.reloc_offset = bytecode->reloc_offset;
lum.u.filter.seqnum = bytecode->seqnum;
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
-int ustctl_set_capture(int sock, struct lttng_ust_capture_bytecode *bytecode,
- struct lttng_ust_object_data *obj_data)
+int ustctl_set_capture(int sock, struct lttng_ust_abi_capture_bytecode *bytecode,
+ struct lttng_ust_abi_object_data *obj_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = obj_data->handle;
- lum.cmd = LTTNG_UST_CAPTURE;
+ lum.cmd = LTTNG_UST_ABI_CAPTURE;
lum.u.capture.data_size = bytecode->len;
lum.u.capture.reloc_offset = bytecode->reloc_offset;
lum.u.capture.seqnum = bytecode->seqnum;
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
-int ustctl_set_exclusion(int sock, struct lttng_ust_event_exclusion *exclusion,
- struct lttng_ust_object_data *obj_data)
+int ustctl_set_exclusion(int sock, struct lttng_ust_abi_event_exclusion *exclusion,
+ struct lttng_ust_abi_object_data *obj_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = obj_data->handle;
- lum.cmd = LTTNG_UST_EXCLUSION;
+ lum.cmd = LTTNG_UST_ABI_EXCLUSION;
lum.u.exclusion.count = exclusion->count;
ret = ustcomm_send_app_msg(sock, &lum);
/* send var len exclusion names */
ret = ustcomm_send_unix_sock(sock,
exclusion->names,
- exclusion->count * LTTNG_UST_SYM_NAME_LEN);
+ exclusion->count * LTTNG_UST_ABI_SYM_NAME_LEN);
if (ret < 0) {
return ret;
}
- if (ret != exclusion->count * LTTNG_UST_SYM_NAME_LEN) {
+ if (ret != exclusion->count * LTTNG_UST_ABI_SYM_NAME_LEN) {
return -EINVAL;
}
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
/* Enable event, channel and session ioctl */
-int ustctl_enable(int sock, struct lttng_ust_object_data *object)
+int ustctl_enable(int sock, struct lttng_ust_abi_object_data *object)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = object->handle;
- lum.cmd = LTTNG_UST_ENABLE;
+ lum.cmd = LTTNG_UST_ABI_ENABLE;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
}
/* Disable event, channel and session ioctl */
-int ustctl_disable(int sock, struct lttng_ust_object_data *object)
+int ustctl_disable(int sock, struct lttng_ust_abi_object_data *object)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = object->handle;
- lum.cmd = LTTNG_UST_DISABLE;
+ lum.cmd = LTTNG_UST_ABI_DISABLE;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
int ustctl_start_session(int sock, int handle)
{
- struct lttng_ust_object_data obj;
+ struct lttng_ust_abi_object_data obj;
obj.handle = handle;
return ustctl_enable(sock, &obj);
int ustctl_stop_session(int sock, int handle)
{
- struct lttng_ust_object_data obj;
+ struct lttng_ust_abi_object_data obj;
obj.handle = handle;
return ustctl_disable(sock, &obj);
}
int ustctl_create_event_notifier_group(int sock, int pipe_fd,
- struct lttng_ust_object_data **_event_notifier_group_data)
+ struct lttng_ust_abi_object_data **_event_notifier_group_data)
{
- struct lttng_ust_object_data *event_notifier_group_data;
+ struct lttng_ust_abi_object_data *event_notifier_group_data;
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
ssize_t len;
if (!event_notifier_group_data)
return -ENOMEM;
- event_notifier_group_data->type = LTTNG_UST_OBJECT_TYPE_EVENT_NOTIFIER_GROUP;
+ event_notifier_group_data->type = LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER_GROUP;
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE;
ret = ustcomm_send_app_msg(sock, &lum);
if (ret)
return ret;
}
-int ustctl_create_event_notifier(int sock, struct lttng_ust_event_notifier *event_notifier,
- struct lttng_ust_object_data *event_notifier_group,
- struct lttng_ust_object_data **_event_notifier_data)
+int ustctl_create_event_notifier(int sock, struct lttng_ust_abi_event_notifier *event_notifier,
+ struct lttng_ust_abi_object_data *event_notifier_group,
+ struct lttng_ust_abi_object_data **_event_notifier_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
- struct lttng_ust_object_data *event_notifier_data;
+ struct lttng_ust_abi_object_data *event_notifier_data;
ssize_t len;
int ret;
if (!event_notifier_data)
return -ENOMEM;
- event_notifier_data->type = LTTNG_UST_OBJECT_TYPE_EVENT_NOTIFIER;
+ event_notifier_data->type = LTTNG_UST_ABI_OBJECT_TYPE_EVENT_NOTIFIER;
memset(&lum, 0, sizeof(lum));
lum.handle = event_notifier_group->handle;
- lum.cmd = LTTNG_UST_EVENT_NOTIFIER_CREATE;
+ lum.cmd = LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE;
lum.u.event_notifier.len = sizeof(*event_notifier);
ret = ustcomm_send_app_msg(sock, &lum);
int ret, tp_list_handle;
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_TRACEPOINT_LIST;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_TRACEPOINT_LIST;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
}
int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
- struct lttng_ust_tracepoint_iter *iter)
+ struct lttng_ust_abi_tracepoint_iter *iter)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = tp_list_handle;
- lum.cmd = LTTNG_UST_TRACEPOINT_LIST_GET;
+ lum.cmd = LTTNG_UST_ABI_TRACEPOINT_LIST_GET;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
int ret, tp_field_list_handle;
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_TRACEPOINT_FIELD_LIST;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
}
int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
- struct lttng_ust_field_iter *iter)
+ struct lttng_ust_abi_field_iter *iter)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = tp_field_list_handle;
- lum.cmd = LTTNG_UST_TRACEPOINT_FIELD_LIST_GET;
+ lum.cmd = LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST_GET;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
return 0;
}
-int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v)
+int ustctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return -EINVAL;
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_TRACER_VERSION;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_TRACER_VERSION;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
int ret;
memset(&lum, 0, sizeof(lum));
- lum.handle = LTTNG_UST_ROOT_HANDLE;
- lum.cmd = LTTNG_UST_WAIT_QUIESCENT;
+ lum.handle = LTTNG_UST_ABI_ROOT_HANDLE;
+ lum.cmd = LTTNG_UST_ABI_WAIT_QUIESCENT;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
return 0;
}
-int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate)
+int ustctl_calibrate(int sock, struct lttng_ust_abi_calibrate *calibrate)
{
if (!calibrate)
return -EINVAL;
return -ENOSYS;
}
-int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object)
+int ustctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = object->handle;
- lum.cmd = LTTNG_UST_FLUSH_BUFFER;
+ lum.cmd = LTTNG_UST_ABI_FLUSH_BUFFER;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
static
int ustctl_send_channel(int sock,
- enum lttng_ust_chan_type type,
+ enum lttng_ust_abi_chan_type type,
void *data,
uint64_t size,
int wakeup_fd,
}
int ustctl_recv_channel_from_consumer(int sock,
- struct lttng_ust_object_data **_channel_data)
+ struct lttng_ust_abi_object_data **_channel_data)
{
- struct lttng_ust_object_data *channel_data;
+ struct lttng_ust_abi_object_data *channel_data;
ssize_t len;
int wakeup_fd;
int ret;
ret = -ENOMEM;
goto error_alloc;
}
- channel_data->type = LTTNG_UST_OBJECT_TYPE_CHANNEL;
+ channel_data->type = LTTNG_UST_ABI_OBJECT_TYPE_CHANNEL;
channel_data->handle = -1;
/* recv mmap size */
}
int ustctl_recv_stream_from_consumer(int sock,
- struct lttng_ust_object_data **_stream_data)
+ struct lttng_ust_abi_object_data **_stream_data)
{
- struct lttng_ust_object_data *stream_data;
+ struct lttng_ust_abi_object_data *stream_data;
ssize_t len;
int ret;
int fds[2];
goto error_alloc;
}
- stream_data->type = LTTNG_UST_OBJECT_TYPE_STREAM;
+ stream_data->type = LTTNG_UST_ABI_OBJECT_TYPE_STREAM;
stream_data->handle = -1;
/* recv mmap size */
}
int ustctl_send_channel_to_ust(int sock, int session_handle,
- struct lttng_ust_object_data *channel_data)
+ struct lttng_ust_abi_object_data *channel_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = session_handle;
- lum.cmd = LTTNG_UST_CHANNEL;
+ lum.cmd = LTTNG_UST_ABI_CHANNEL;
lum.u.channel.len = channel_data->size;
lum.u.channel.type = channel_data->u.channel.type;
ret = ustcomm_send_app_msg(sock, &lum);
}
int ustctl_send_stream_to_ust(int sock,
- struct lttng_ust_object_data *channel_data,
- struct lttng_ust_object_data *stream_data)
+ struct lttng_ust_abi_object_data *channel_data,
+ struct lttng_ust_abi_object_data *stream_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
memset(&lum, 0, sizeof(lum));
lum.handle = channel_data->handle;
- lum.cmd = LTTNG_UST_STREAM;
+ lum.cmd = LTTNG_UST_ABI_STREAM;
lum.u.stream.len = stream_data->size;
lum.u.stream.stream_nr = stream_data->u.stream.stream_nr;
ret = ustcomm_send_app_msg(sock, &lum);
return ret;
assert(stream_data);
- assert(stream_data->type == LTTNG_UST_OBJECT_TYPE_STREAM);
+ assert(stream_data->type == LTTNG_UST_ABI_OBJECT_TYPE_STREAM);
ret = ustctl_send_stream(sock,
stream_data->u.stream.stream_nr,
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
-int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest,
- struct lttng_ust_object_data *src)
+int ustctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
+ struct lttng_ust_abi_object_data *src)
{
- struct lttng_ust_object_data *obj;
+ struct lttng_ust_abi_object_data *obj;
int ret;
if (src->handle != -1) {
obj->size = src->size;
switch (obj->type) {
- case LTTNG_UST_OBJECT_TYPE_CHANNEL:
+ case LTTNG_UST_ABI_OBJECT_TYPE_CHANNEL:
{
obj->u.channel.type = src->u.channel.type;
if (src->u.channel.wakeup_fd >= 0) {
}
- case LTTNG_UST_OBJECT_TYPE_STREAM:
+ case LTTNG_UST_ABI_OBJECT_TYPE_STREAM:
{
obj->u.stream.stream_nr = src->u.stream.stream_nr;
if (src->u.stream.wakeup_fd >= 0) {
goto error_type;
}
- case LTTNG_UST_OBJECT_TYPE_COUNTER:
+ case LTTNG_UST_ABI_OBJECT_TYPE_COUNTER:
{
obj->u.counter.data = zmalloc(obj->size);
if (!obj->u.counter.data) {
break;
}
- case LTTNG_UST_OBJECT_TYPE_COUNTER_GLOBAL:
+ case LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_GLOBAL:
{
if (src->u.counter_global.shm_fd >= 0) {
obj->u.counter_global.shm_fd =
break;
}
- case LTTNG_UST_OBJECT_TYPE_COUNTER_CPU:
+ case LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_CPU:
{
obj->u.counter_cpu.cpu_nr = src->u.counter_cpu.cpu_nr;
if (src->u.counter_cpu.shm_fd >= 0) {
struct lttng_transport *transport;
switch (attr->type) {
- case LTTNG_UST_CHAN_PER_CPU:
- if (attr->output == LTTNG_UST_MMAP) {
+ case LTTNG_UST_ABI_CHAN_PER_CPU:
+ if (attr->output == LTTNG_UST_ABI_MMAP) {
if (attr->overwrite) {
if (attr->read_timer_interval == 0) {
transport_name = "relay-overwrite-mmap";
return NULL;
}
break;
- case LTTNG_UST_CHAN_METADATA:
- if (attr->output == LTTNG_UST_MMAP)
+ case LTTNG_UST_ABI_CHAN_METADATA:
+ if (attr->output == LTTNG_UST_ABI_MMAP)
transport_name = "relay-metadata-mmap";
else
return NULL;
if (len < 0)
return len;
- if (reg_msg.magic == LTTNG_UST_COMM_MAGIC) {
+ if (reg_msg.magic == LTTNG_UST_ABI_COMM_MAGIC) {
*byte_order = BYTE_ORDER == BIG_ENDIAN ?
BIG_ENDIAN : LITTLE_ENDIAN;
- } else if (reg_msg.magic == bswap_32(LTTNG_UST_COMM_MAGIC)) {
+ } else if (reg_msg.magic == bswap_32(LTTNG_UST_ABI_COMM_MAGIC)) {
*byte_order = BYTE_ORDER == BIG_ENDIAN ?
LITTLE_ENDIAN : BIG_ENDIAN;
} else {
*session_objd = msg.session_objd;
*channel_objd = msg.channel_objd;
- strncpy(event_name, msg.event_name, LTTNG_UST_SYM_NAME_LEN);
- event_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(event_name, msg.event_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ event_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
*loglevel = msg.loglevel;
signature_len = msg.signature_len;
fields_len = msg.fields_len;
return len;
*session_objd = msg.session_objd;
- strncpy(enum_name, msg.enum_name, LTTNG_UST_SYM_NAME_LEN);
- enum_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ strncpy(enum_name, msg.enum_name, LTTNG_UST_ABI_SYM_NAME_LEN);
+ enum_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
entries_len = msg.entries_len;
if (entries_len % sizeof(*a_entries) != 0) {
memset(&lum, 0, sizeof(lum));
lum.handle = handle;
- lum.cmd = LTTNG_UST_SESSION_STATEDUMP;
+ lum.cmd = LTTNG_UST_ABI_SESSION_STATEDUMP;
ret = ustcomm_send_app_cmd(sock, &lum, &lur);
if (ret)
return ret;
}
int ustctl_create_counter_data(struct ustctl_daemon_counter *counter,
- struct lttng_ust_object_data **_counter_data)
+ struct lttng_ust_abi_object_data **_counter_data)
{
- struct lttng_ust_object_data *counter_data;
- struct lttng_ust_counter_conf counter_conf = {0};
+ struct lttng_ust_abi_object_data *counter_data;
+ struct lttng_ust_abi_counter_conf counter_conf = {0};
size_t i;
int ret;
switch (counter->attr->arithmetic) {
case USTCTL_COUNTER_ARITHMETIC_MODULAR:
- counter_conf.arithmetic = LTTNG_UST_COUNTER_ARITHMETIC_MODULAR;
+ counter_conf.arithmetic = LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR;
break;
case USTCTL_COUNTER_ARITHMETIC_SATURATION:
- counter_conf.arithmetic = LTTNG_UST_COUNTER_ARITHMETIC_SATURATION;
+ counter_conf.arithmetic = LTTNG_UST_ABI_COUNTER_ARITHMETIC_SATURATION;
break;
default:
return -EINVAL;
}
switch (counter->attr->bitness) {
case USTCTL_COUNTER_BITNESS_32:
- counter_conf.bitness = LTTNG_UST_COUNTER_BITNESS_32;
+ counter_conf.bitness = LTTNG_UST_ABI_COUNTER_BITNESS_32;
break;
case USTCTL_COUNTER_BITNESS_64:
- counter_conf.bitness = LTTNG_UST_COUNTER_BITNESS_64;
+ counter_conf.bitness = LTTNG_UST_ABI_COUNTER_BITNESS_64;
break;
default:
return -EINVAL;
ret = -ENOMEM;
goto error_alloc;
}
- counter_data->type = LTTNG_UST_OBJECT_TYPE_COUNTER;
+ counter_data->type = LTTNG_UST_ABI_OBJECT_TYPE_COUNTER;
counter_data->handle = -1;
counter_data->size = sizeof(counter_conf);
}
int ustctl_create_counter_global_data(struct ustctl_daemon_counter *counter,
- struct lttng_ust_object_data **_counter_global_data)
+ struct lttng_ust_abi_object_data **_counter_global_data)
{
- struct lttng_ust_object_data *counter_global_data;
+ struct lttng_ust_abi_object_data *counter_global_data;
int ret, fd;
size_t len;
ret = -ENOMEM;
goto error_alloc;
}
- counter_global_data->type = LTTNG_UST_OBJECT_TYPE_COUNTER_GLOBAL;
+ counter_global_data->type = LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_GLOBAL;
counter_global_data->handle = -1;
counter_global_data->size = len;
counter_global_data->u.counter_global.shm_fd = fd;
}
int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cpu,
- struct lttng_ust_object_data **_counter_cpu_data)
+ struct lttng_ust_abi_object_data **_counter_cpu_data)
{
- struct lttng_ust_object_data *counter_cpu_data;
+ struct lttng_ust_abi_object_data *counter_cpu_data;
int ret, fd;
size_t len;
ret = -ENOMEM;
goto error_alloc;
}
- counter_cpu_data->type = LTTNG_UST_OBJECT_TYPE_COUNTER_CPU;
+ counter_cpu_data->type = LTTNG_UST_ABI_OBJECT_TYPE_COUNTER_CPU;
counter_cpu_data->handle = -1;
counter_cpu_data->size = len;
counter_cpu_data->u.counter_cpu.shm_fd = fd;
}
int ustctl_send_counter_data_to_ust(int sock, int parent_handle,
- struct lttng_ust_object_data *counter_data)
+ struct lttng_ust_abi_object_data *counter_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
size = counter_data->size;
memset(&lum, 0, sizeof(lum));
lum.handle = parent_handle;
- lum.cmd = LTTNG_UST_COUNTER;
+ lum.cmd = LTTNG_UST_ABI_COUNTER;
lum.u.counter.len = size;
ret = ustcomm_send_app_msg(sock, &lum);
if (ret)
}
int ustctl_send_counter_global_data_to_ust(int sock,
- struct lttng_ust_object_data *counter_data,
- struct lttng_ust_object_data *counter_global_data)
+ struct lttng_ust_abi_object_data *counter_data,
+ struct lttng_ust_abi_object_data *counter_global_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
size = counter_global_data->size;
memset(&lum, 0, sizeof(lum));
lum.handle = counter_data->handle; /* parent handle */
- lum.cmd = LTTNG_UST_COUNTER_GLOBAL;
+ lum.cmd = LTTNG_UST_ABI_COUNTER_GLOBAL;
lum.u.counter_global.len = size;
ret = ustcomm_send_app_msg(sock, &lum);
if (ret)
}
int ustctl_send_counter_cpu_data_to_ust(int sock,
- struct lttng_ust_object_data *counter_data,
- struct lttng_ust_object_data *counter_cpu_data)
+ struct lttng_ust_abi_object_data *counter_data,
+ struct lttng_ust_abi_object_data *counter_cpu_data)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
size = counter_cpu_data->size;
memset(&lum, 0, sizeof(lum));
lum.handle = counter_data->handle; /* parent handle */
- lum.cmd = LTTNG_UST_COUNTER_CPU;
+ lum.cmd = LTTNG_UST_ABI_COUNTER_CPU;
lum.u.counter_cpu.len = size;
lum.u.counter_cpu.cpu_nr = counter_cpu_data->u.counter_cpu.cpu_nr;
ret = ustcomm_send_app_msg(sock, &lum);
#include <lttng/ust-events.h>
#include "ust-helper.h"
+#include "ust-events-internal.h"
LTTNG_HIDDEN
int lttng_context_init_all(struct lttng_ctx **ctx);
LTTNG_HIDDEN
-int lttng_attach_context(struct lttng_ust_context *context_param,
- union ust_args *uargs,
+int lttng_attach_context(struct lttng_ust_abi_context *context_param,
+ union lttng_ust_abi_args *uargs,
struct lttng_ctx **ctx, struct lttng_session *session);
LTTNG_HIDDEN
* of the notification struct we are sending alongside the capture buffer.
*/
#define CAPTURE_BUFFER_SIZE \
- (PIPE_BUF - sizeof(struct lttng_ust_event_notifier_notification) - 1)
+ (PIPE_BUF - sizeof(struct lttng_ust_abi_event_notifier_notification) - 1)
struct lttng_event_notifier_notification {
int notification_fd;
ssize_t ret;
size_t content_len;
int iovec_count = 1;
- struct lttng_ust_event_notifier_notification ust_notif = {0};
+ struct lttng_ust_abi_event_notifier_notification ust_notif = {0};
struct iovec iov[2];
assert(notif);
return -EINVAL;
/* Check if field offset is too large for 16-bit offset */
- if (field_offset > FILTER_BYTECODE_MAX_LEN - 1)
+ if (field_offset > LTTNG_UST_ABI_FILTER_BYTECODE_MAX_LEN - 1)
return -EINVAL;
/* set type */
}
}
/* Check if idx is too large for 16-bit offset */
- if (idx > FILTER_BYTECODE_MAX_LEN - 1)
+ if (idx > LTTNG_UST_ABI_FILTER_BYTECODE_MAX_LEN - 1)
return -EINVAL;
/* Get context return type */
static
int lttng_loglevel_match(int loglevel,
unsigned int has_loglevel,
- enum lttng_ust_loglevel_type req_type,
+ enum lttng_ust_abi_loglevel_type req_type,
int req_loglevel)
{
if (!has_loglevel)
loglevel = TRACE_DEFAULT;
switch (req_type) {
- case LTTNG_UST_LOGLEVEL_RANGE:
+ case LTTNG_UST_ABI_LOGLEVEL_RANGE:
if (loglevel <= req_loglevel
|| (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
return 1;
else
return 0;
- case LTTNG_UST_LOGLEVEL_SINGLE:
+ case LTTNG_UST_ABI_LOGLEVEL_SINGLE:
if (loglevel == req_loglevel
|| (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
return 1;
else
return 0;
- case LTTNG_UST_LOGLEVEL_ALL:
+ case LTTNG_UST_ABI_LOGLEVEL_ALL:
default:
if (loglevel <= TRACE_DEBUG)
return 1;
char *excluder_name;
excluder_name = (char *) (excluder->excluder.names)
- + count * LTTNG_UST_SYM_NAME_LEN;
- len = strnlen(excluder_name, LTTNG_UST_SYM_NAME_LEN);
+ + count * LTTNG_UST_ABI_SYM_NAME_LEN;
+ len = strnlen(excluder_name, LTTNG_UST_ABI_SYM_NAME_LEN);
if (len > 0 && strutils_star_glob_match(excluder_name, len, desc->name, SIZE_MAX))
return 0;
}
free(_enum);
}
-void lttng_ust_events_exit(void)
+void lttng_ust_abi_events_exit(void)
{
struct lttng_ust_session_private *session_priv, *tmpsession_priv;
*/
struct lttng_event_enabler *lttng_event_enabler_create(
enum lttng_enabler_format_type format_type,
- struct lttng_ust_event *event_param,
+ struct lttng_ust_abi_event *event_param,
struct lttng_channel *chan)
{
struct lttng_event_enabler *event_enabler;
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_event_notifier *event_notifier_param)
+ struct lttng_ust_abi_event_notifier *event_notifier_param)
{
struct lttng_event_notifier_enabler *event_notifier_enabler;
return 0;
}
-int lttng_attach_context(struct lttng_ust_context *context_param,
- union ust_args *uargs,
+int lttng_attach_context(struct lttng_ust_abi_context *context_param,
+ union lttng_ust_abi_args *uargs,
struct lttng_ctx **ctx, struct lttng_session *session)
{
/*
return -EPERM;
switch (context_param->ctx) {
- case LTTNG_UST_CONTEXT_PTHREAD_ID:
+ case LTTNG_UST_ABI_CONTEXT_PTHREAD_ID:
return lttng_add_pthread_id_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
+ case LTTNG_UST_ABI_CONTEXT_PERF_THREAD_COUNTER:
{
- struct lttng_ust_perf_counter_ctx *perf_ctx_param;
+ struct lttng_ust_abi_perf_counter_ctx *perf_ctx_param;
perf_ctx_param = &context_param->u.perf_counter;
return lttng_add_perf_counter_to_ctx(
perf_ctx_param->name,
ctx);
}
- case LTTNG_UST_CONTEXT_VTID:
+ case LTTNG_UST_ABI_CONTEXT_VTID:
return lttng_add_vtid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VPID:
+ case LTTNG_UST_ABI_CONTEXT_VPID:
return lttng_add_vpid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_PROCNAME:
+ case LTTNG_UST_ABI_CONTEXT_PROCNAME:
return lttng_add_procname_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_IP:
+ case LTTNG_UST_ABI_CONTEXT_IP:
return lttng_add_ip_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_CPU_ID:
+ case LTTNG_UST_ABI_CONTEXT_CPU_ID:
return lttng_add_cpu_id_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
return lttng_ust_add_app_context_to_ctx_rcu(uargs->app_context.ctxname,
ctx);
- case LTTNG_UST_CONTEXT_CGROUP_NS:
+ case LTTNG_UST_ABI_CONTEXT_CGROUP_NS:
return lttng_add_cgroup_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_IPC_NS:
+ case LTTNG_UST_ABI_CONTEXT_IPC_NS:
return lttng_add_ipc_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_MNT_NS:
+ case LTTNG_UST_ABI_CONTEXT_MNT_NS:
return lttng_add_mnt_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_NET_NS:
+ case LTTNG_UST_ABI_CONTEXT_NET_NS:
return lttng_add_net_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_PID_NS:
+ case LTTNG_UST_ABI_CONTEXT_PID_NS:
return lttng_add_pid_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_TIME_NS:
+ case LTTNG_UST_ABI_CONTEXT_TIME_NS:
return lttng_add_time_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_USER_NS:
+ case LTTNG_UST_ABI_CONTEXT_USER_NS:
return lttng_add_user_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_UTS_NS:
+ case LTTNG_UST_ABI_CONTEXT_UTS_NS:
return lttng_add_uts_ns_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VUID:
+ case LTTNG_UST_ABI_CONTEXT_VUID:
return lttng_add_vuid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VEUID:
+ case LTTNG_UST_ABI_CONTEXT_VEUID:
return lttng_add_veuid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VSUID:
+ case LTTNG_UST_ABI_CONTEXT_VSUID:
return lttng_add_vsuid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VGID:
+ case LTTNG_UST_ABI_CONTEXT_VGID:
return lttng_add_vgid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VEGID:
+ case LTTNG_UST_ABI_CONTEXT_VEGID:
return lttng_add_vegid_to_ctx(ctx);
- case LTTNG_UST_CONTEXT_VSGID:
+ case LTTNG_UST_ABI_CONTEXT_VSGID:
return lttng_add_vsgid_to_ctx(ctx);
default:
return -EINVAL;
}
int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
- struct lttng_ust_context *context_param)
+ struct lttng_ust_abi_context *context_param)
{
return -ENOSYS;
}
size_t provider_name_len;
provider_name_len = strnlen(desc->provider,
- LTTNG_UST_SYM_NAME_LEN - 1);
+ LTTNG_UST_ABI_SYM_NAME_LEN - 1);
for (i = 0; i < desc->nr_events; i++) {
if (strncmp(desc->event_desc[i]->name,
desc->provider,
cds_list_add(&list_entry->head, &list->head);
strncpy(list_entry->tp.name,
probe_desc->event_desc[i]->name,
- LTTNG_UST_SYM_NAME_LEN);
- list_entry->tp.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ list_entry->tp.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
if (!probe_desc->event_desc[i]->loglevel) {
list_entry->tp.loglevel = TRACE_DEFAULT;
} else {
* Return current iteration position, advance internal iterator to next.
* Return NULL if end of list.
*/
-struct lttng_ust_tracepoint_iter *
+struct lttng_ust_abi_tracepoint_iter *
lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list)
{
struct tp_list_entry *entry;
cds_list_add(&list_entry->head, &list->head);
strncpy(list_entry->field.event_name,
event_desc->name,
- LTTNG_UST_SYM_NAME_LEN);
- list_entry->field.event_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ list_entry->field.event_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
list_entry->field.field_name[0] = '\0';
- list_entry->field.type = LTTNG_UST_FIELD_OTHER;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER;
if (!event_desc->loglevel) {
list_entry->field.loglevel = TRACE_DEFAULT;
} else {
cds_list_add(&list_entry->head, &list->head);
strncpy(list_entry->field.event_name,
event_desc->name,
- LTTNG_UST_SYM_NAME_LEN);
- list_entry->field.event_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ list_entry->field.event_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
strncpy(list_entry->field.field_name,
event_field->name,
- LTTNG_UST_SYM_NAME_LEN);
- list_entry->field.field_name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ LTTNG_UST_ABI_SYM_NAME_LEN);
+ list_entry->field.field_name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
switch (event_field->type.atype) {
case atype_integer:
- list_entry->field.type = LTTNG_UST_FIELD_INTEGER;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_INTEGER;
break;
case atype_string:
- list_entry->field.type = LTTNG_UST_FIELD_STRING;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_STRING;
break;
case atype_array_nestable:
if (event_field->type.u.array_nestable.elem_type->atype != atype_integer
|| event_field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_encode_none)
- list_entry->field.type = LTTNG_UST_FIELD_OTHER;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER;
else
- list_entry->field.type = LTTNG_UST_FIELD_STRING;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_STRING;
break;
case atype_sequence_nestable:
if (event_field->type.u.sequence_nestable.elem_type->atype != atype_integer
|| event_field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_encode_none)
- list_entry->field.type = LTTNG_UST_FIELD_OTHER;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER;
else
- list_entry->field.type = LTTNG_UST_FIELD_STRING;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_STRING;
break;
case atype_float:
- list_entry->field.type = LTTNG_UST_FIELD_FLOAT;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_FLOAT;
break;
case atype_enum_nestable:
- list_entry->field.type = LTTNG_UST_FIELD_ENUM;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_ENUM;
break;
default:
- list_entry->field.type = LTTNG_UST_FIELD_OTHER;
+ list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER;
}
if (!event_desc->loglevel) {
list_entry->field.loglevel = TRACE_DEFAULT;
* Return current iteration position, advance internal iterator to next.
* Return NULL if end of list.
*/
-struct lttng_ust_field_iter *
+struct lttng_ust_abi_field_iter *
lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list)
{
struct tp_field_list_entry *entry;
* by the caller.
*/
-struct lttng_ust_obj {
+struct lttng_ust_abi_obj {
union {
struct {
void *private_data;
- const struct lttng_ust_objd_ops *ops;
+ const struct lttng_ust_abi_objd_ops *ops;
int f_count;
int owner_ref; /* has ref from owner */
void *owner;
} u;
};
-struct lttng_ust_objd_table {
- struct lttng_ust_obj *array;
+struct lttng_ust_abi_objd_table {
+ struct lttng_ust_abi_obj *array;
unsigned int len, allocated_len;
int freelist_head; /* offset freelist head. end is -1 */
};
-static struct lttng_ust_objd_table objd_table = {
+static struct lttng_ust_abi_objd_table objd_table = {
.freelist_head = -1,
};
static
-int objd_alloc(void *private_data, const struct lttng_ust_objd_ops *ops,
+int objd_alloc(void *private_data, const struct lttng_ust_abi_objd_ops *ops,
void *owner, const char *name)
{
- struct lttng_ust_obj *obj;
+ struct lttng_ust_abi_obj *obj;
if (objd_table.freelist_head != -1) {
obj = &objd_table.array[objd_table.freelist_head];
if (objd_table.len >= objd_table.allocated_len) {
unsigned int new_allocated_len, old_allocated_len;
- struct lttng_ust_obj *new_table, *old_table;
+ struct lttng_ust_abi_obj *new_table, *old_table;
old_allocated_len = objd_table.allocated_len;
old_table = objd_table.array;
new_allocated_len = 1;
else
new_allocated_len = old_allocated_len << 1;
- new_table = zmalloc(sizeof(struct lttng_ust_obj) * new_allocated_len);
+ new_table = zmalloc(sizeof(struct lttng_ust_abi_obj) * new_allocated_len);
if (!new_table)
return -ENOMEM;
memcpy(new_table, old_table,
- sizeof(struct lttng_ust_obj) * old_allocated_len);
+ sizeof(struct lttng_ust_abi_obj) * old_allocated_len);
free(old_table);
objd_table.array = new_table;
objd_table.allocated_len = new_allocated_len;
}
static
-struct lttng_ust_obj *_objd_get(int id)
+struct lttng_ust_abi_obj *_objd_get(int id)
{
if (id >= objd_table.len)
return NULL;
static
void *objd_private(int id)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
assert(obj);
return obj->u.s.private_data;
}
static
void objd_set_private(int id, void *private_data)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
assert(obj);
obj->u.s.private_data = private_data;
}
-const struct lttng_ust_objd_ops *objd_ops(int id)
+const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
if (!obj)
return NULL;
static
void objd_free(int id)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
assert(obj);
obj->u.freelist_next = objd_table.freelist_head;
static
void objd_ref(int id)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
assert(obj != NULL);
obj->u.s.f_count++;
}
-int lttng_ust_objd_unref(int id, int is_owner)
+int lttng_ust_abi_objd_unref(int id, int is_owner)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
if (!obj)
return -EINVAL;
obj->u.s.owner_ref--;
}
if ((--obj->u.s.f_count) == 1) {
- const struct lttng_ust_objd_ops *ops = objd_ops(id);
+ const struct lttng_ust_abi_objd_ops *ops = lttng_ust_abi_objd_ops(id);
if (ops->release)
ops->release(id);
int i;
for (i = 0; i < objd_table.allocated_len; i++) {
- struct lttng_ust_obj *obj;
+ struct lttng_ust_abi_obj *obj;
obj = _objd_get(i);
if (!obj)
continue;
if (!obj->u.s.owner_ref)
continue; /* only unref owner ref. */
- (void) lttng_ust_objd_unref(i, 1);
+ (void) lttng_ust_abi_objd_unref(i, 1);
}
free(objd_table.array);
objd_table.array = NULL;
const char *lttng_ust_obj_get_name(int id)
{
- struct lttng_ust_obj *obj = _objd_get(id);
+ struct lttng_ust_abi_obj *obj = _objd_get(id);
if (!obj)
return NULL;
return obj->u.s.name;
}
-void lttng_ust_objd_table_owner_cleanup(void *owner)
+void lttng_ust_abi_objd_table_owner_cleanup(void *owner)
{
int i;
for (i = 0; i < objd_table.allocated_len; i++) {
- struct lttng_ust_obj *obj;
+ struct lttng_ust_abi_obj *obj;
obj = _objd_get(i);
if (!obj)
if (!obj->u.s.owner_ref)
continue; /* only unref owner ref. */
if (obj->u.s.owner == owner)
- (void) lttng_ust_objd_unref(i, 1);
+ (void) lttng_ust_abi_objd_unref(i, 1);
}
}
* We send commands over a socket.
*/
-static const struct lttng_ust_objd_ops lttng_ops;
-static const struct lttng_ust_objd_ops lttng_event_notifier_group_ops;
-static const struct lttng_ust_objd_ops lttng_session_ops;
-static const struct lttng_ust_objd_ops lttng_channel_ops;
-static const struct lttng_ust_objd_ops lttng_event_enabler_ops;
-static const struct lttng_ust_objd_ops lttng_event_notifier_enabler_ops;
-static const struct lttng_ust_objd_ops lttng_tracepoint_list_ops;
-static const struct lttng_ust_objd_ops lttng_tracepoint_field_list_ops;
+static const struct lttng_ust_abi_objd_ops lttng_ops;
+static const struct lttng_ust_abi_objd_ops lttng_event_notifier_group_ops;
+static const struct lttng_ust_abi_objd_ops lttng_session_ops;
+static const struct lttng_ust_abi_objd_ops lttng_channel_ops;
+static const struct lttng_ust_abi_objd_ops lttng_event_enabler_ops;
+static const struct lttng_ust_abi_objd_ops lttng_event_notifier_enabler_ops;
+static const struct lttng_ust_abi_objd_ops lttng_tracepoint_list_ops;
+static const struct lttng_ust_abi_objd_ops lttng_tracepoint_field_list_ops;
int lttng_abi_create_root_handle(void)
{
static
long lttng_abi_tracer_version(int objd,
- struct lttng_ust_tracer_version *v)
+ struct lttng_ust_abi_tracer_version *v)
{
v->major = LTTNG_UST_MAJOR_VERSION;
v->minor = LTTNG_UST_MINOR_VERSION;
static
long lttng_abi_add_context(int objd,
- struct lttng_ust_context *context_param,
- union ust_args *uargs,
+ struct lttng_ust_abi_context *context_param,
+ union lttng_ust_abi_args *uargs,
struct lttng_ctx **ctx, struct lttng_session *session)
{
return lttng_attach_context(context_param, uargs, ctx, session);
* @owner: objd owner
*
* This descriptor implements lttng commands:
- * LTTNG_UST_SESSION
+ * LTTNG_UST_ABI_SESSION
* Returns a LTTng trace session object descriptor
- * LTTNG_UST_TRACER_VERSION
+ * LTTNG_UST_ABI_TRACER_VERSION
* Returns the LTTng kernel tracer version
- * LTTNG_UST_TRACEPOINT_LIST
+ * LTTNG_UST_ABI_TRACEPOINT_LIST
* Returns a file descriptor listing available tracepoints
- * LTTNG_UST_TRACEPOINT_FIELD_LIST
+ * LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST
* Returns a file descriptor listing available tracepoint fields
- * LTTNG_UST_WAIT_QUIESCENT
+ * LTTNG_UST_ABI_WAIT_QUIESCENT
* Returns after all previously running probes have completed
*
* The returned session will be deleted when its file descriptor is closed.
*/
static
long lttng_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
switch (cmd) {
- case LTTNG_UST_SESSION:
+ case LTTNG_UST_ABI_SESSION:
return lttng_abi_create_session(owner);
- case LTTNG_UST_TRACER_VERSION:
+ case LTTNG_UST_ABI_TRACER_VERSION:
return lttng_abi_tracer_version(objd,
- (struct lttng_ust_tracer_version *) arg);
- case LTTNG_UST_TRACEPOINT_LIST:
+ (struct lttng_ust_abi_tracer_version *) arg);
+ case LTTNG_UST_ABI_TRACEPOINT_LIST:
return lttng_abi_tracepoint_list(owner);
- case LTTNG_UST_TRACEPOINT_FIELD_LIST:
+ case LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST:
return lttng_abi_tracepoint_field_list(owner);
- case LTTNG_UST_WAIT_QUIESCENT:
+ case LTTNG_UST_ABI_WAIT_QUIESCENT:
lttng_ust_urcu_synchronize_rcu();
return 0;
- case LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE:
+ case LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE:
return lttng_abi_event_notifier_send_fd(owner,
&uargs->event_notifier_handle.event_notifier_notif_fd);
default:
}
}
-static const struct lttng_ust_objd_ops lttng_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_ops = {
.cmd = lttng_cmd,
};
static
int lttng_abi_map_channel(int session_objd,
- struct lttng_ust_channel *ust_chan,
- union ust_args *uargs,
+ struct lttng_ust_abi_channel *ust_chan,
+ union lttng_ust_abi_args *uargs,
void *owner)
{
struct lttng_session *session = objd_private(session_objd);
int wakeup_fd;
uint64_t len;
int ret;
- enum lttng_ust_chan_type type;
+ enum lttng_ust_abi_chan_type type;
chan_data = uargs->channel.chan_data;
wakeup_fd = uargs->channel.wakeup_fd;
type = ust_chan->type;
switch (type) {
- case LTTNG_UST_CHAN_PER_CPU:
+ case LTTNG_UST_ABI_CHAN_PER_CPU:
break;
default:
ret = -EINVAL;
/* Lookup transport name */
switch (type) {
- case LTTNG_UST_CHAN_PER_CPU:
+ case LTTNG_UST_ABI_CHAN_PER_CPU:
if (config->output == RING_BUFFER_MMAP) {
if (config->mode == RING_BUFFER_OVERWRITE) {
if (config->wakeup == RING_BUFFER_WAKEUP_BY_WRITER) {
* @owner: objd owner
*
* This descriptor implements lttng commands:
- * LTTNG_UST_CHANNEL
+ * LTTNG_UST_ABI_CHANNEL
* Returns a LTTng channel object descriptor
- * LTTNG_UST_ENABLE
+ * LTTNG_UST_ABI_ENABLE
* Enables tracing for a session (weak enable)
- * LTTNG_UST_DISABLE
+ * LTTNG_UST_ABI_DISABLE
* Disables tracing for a session (strong disable)
*
* The returned channel will be deleted when its file descriptor is closed.
*/
static
long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_session *session = objd_private(objd);
switch (cmd) {
- case LTTNG_UST_CHANNEL:
+ case LTTNG_UST_ABI_CHANNEL:
return lttng_abi_map_channel(objd,
- (struct lttng_ust_channel *) arg,
+ (struct lttng_ust_abi_channel *) arg,
uargs, owner);
- case LTTNG_UST_SESSION_START:
- case LTTNG_UST_ENABLE:
+ case LTTNG_UST_ABI_SESSION_START:
+ case LTTNG_UST_ABI_ENABLE:
return lttng_session_enable(session);
- case LTTNG_UST_SESSION_STOP:
- case LTTNG_UST_DISABLE:
+ case LTTNG_UST_ABI_SESSION_STOP:
+ case LTTNG_UST_ABI_DISABLE:
return lttng_session_disable(session);
- case LTTNG_UST_SESSION_STATEDUMP:
+ case LTTNG_UST_ABI_SESSION_STATEDUMP:
return lttng_session_statedump(session);
- case LTTNG_UST_COUNTER:
- case LTTNG_UST_COUNTER_GLOBAL:
- case LTTNG_UST_COUNTER_CPU:
+ case LTTNG_UST_ABI_COUNTER:
+ case LTTNG_UST_ABI_COUNTER_GLOBAL:
+ case LTTNG_UST_ABI_COUNTER_CPU:
/* Not implemented yet. */
return -EINVAL;
default:
}
}
-static const struct lttng_ust_objd_ops lttng_session_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_session_ops = {
.release = lttng_release_session,
.cmd = lttng_session_cmd,
};
static int lttng_ust_event_notifier_enabler_create(int event_notifier_group_obj,
- void *owner, struct lttng_ust_event_notifier *event_notifier_param,
+ void *owner, struct lttng_ust_abi_event_notifier *event_notifier_param,
enum lttng_enabler_format_type type)
{
struct lttng_event_notifier_group *event_notifier_group =
struct lttng_event_notifier_enabler *event_notifier_enabler;
int event_notifier_objd, ret;
- event_notifier_param->event.name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ event_notifier_param->event.name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
event_notifier_objd = objd_alloc(NULL, <tng_event_notifier_enabler_ops, owner,
"event_notifier enabler");
if (event_notifier_objd < 0) {
{
int err;
- err = lttng_ust_objd_unref(event_notifier_objd, 1);
+ err = lttng_ust_abi_objd_unref(event_notifier_objd, 1);
assert(!err);
}
objd_error:
static
long lttng_event_notifier_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_event_notifier_enabler *event_notifier_enabler = objd_private(objd);
switch (cmd) {
- case LTTNG_UST_FILTER:
+ case LTTNG_UST_ABI_FILTER:
return lttng_event_notifier_enabler_attach_filter_bytecode(
event_notifier_enabler,
(struct lttng_ust_bytecode_node **) arg);
- case LTTNG_UST_EXCLUSION:
+ case LTTNG_UST_ABI_EXCLUSION:
return lttng_event_notifier_enabler_attach_exclusion(event_notifier_enabler,
(struct lttng_ust_excluder_node **) arg);
- case LTTNG_UST_CAPTURE:
+ case LTTNG_UST_ABI_CAPTURE:
return lttng_event_notifier_enabler_attach_capture_bytecode(
event_notifier_enabler,
(struct lttng_ust_bytecode_node **) arg);
- case LTTNG_UST_ENABLE:
+ case LTTNG_UST_ABI_ENABLE:
return lttng_event_notifier_enabler_enable(event_notifier_enabler);
- case LTTNG_UST_DISABLE:
+ case LTTNG_UST_ABI_DISABLE:
return lttng_event_notifier_enabler_disable(event_notifier_enabler);
default:
return -EINVAL;
* @owner: objd owner
*
* This descriptor implements lttng commands:
- * LTTNG_UST_COUNTER_GLOBAL
+ * LTTNG_UST_ABI_COUNTER_GLOBAL
* Return negative error code on error, 0 on success.
- * LTTNG_UST_COUNTER_CPU
+ * LTTNG_UST_ABI_COUNTER_CPU
* Return negative error code on error, 0 on success.
*/
static
long lttng_event_notifier_group_error_counter_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
int ret;
struct lttng_counter *counter = objd_private(objd);
switch (cmd) {
- case LTTNG_UST_COUNTER_GLOBAL:
+ case LTTNG_UST_ABI_COUNTER_GLOBAL:
ret = -EINVAL; /* Unimplemented. */
break;
- case LTTNG_UST_COUNTER_CPU:
+ case LTTNG_UST_ABI_COUNTER_CPU:
{
- struct lttng_ust_counter_cpu *counter_cpu =
- (struct lttng_ust_counter_cpu *)arg;
+ struct lttng_ust_abi_counter_cpu *counter_cpu =
+ (struct lttng_ust_abi_counter_cpu *)arg;
ret = lttng_counter_set_cpu_shm(counter->counter,
counter_cpu->cpu_nr, uargs->counter_shm.shm_fd);
struct lttng_counter *counter = objd_private(objd);
if (counter) {
- return lttng_ust_objd_unref(counter->event_notifier_group->objd, 0);
+ return lttng_ust_abi_objd_unref(counter->event_notifier_group->objd, 0);
} else {
return -EINVAL;
}
}
-static const struct lttng_ust_objd_ops lttng_event_notifier_group_error_counter_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_event_notifier_group_error_counter_ops = {
.release = lttng_release_event_notifier_group_error_counter,
.cmd = lttng_event_notifier_group_error_counter_cmd,
};
static
int lttng_ust_event_notifier_group_create_error_counter(int event_notifier_group_objd, void *owner,
- struct lttng_ust_counter_conf *error_counter_conf)
+ struct lttng_ust_abi_counter_conf *error_counter_conf)
{
const char *counter_transport_name;
struct lttng_event_notifier_group *event_notifier_group =
if (event_notifier_group->error_counter)
return -EBUSY;
- if (error_counter_conf->arithmetic != LTTNG_UST_COUNTER_ARITHMETIC_MODULAR)
+ if (error_counter_conf->arithmetic != LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR)
return -EINVAL;
if (error_counter_conf->number_dimensions != 1)
return -EINVAL;
switch (error_counter_conf->bitness) {
- case LTTNG_UST_COUNTER_BITNESS_64:
+ case LTTNG_UST_ABI_COUNTER_BITNESS_64:
counter_transport_name = "counter-per-cpu-64-modular";
break;
- case LTTNG_UST_COUNTER_BITNESS_32:
+ case LTTNG_UST_ABI_COUNTER_BITNESS_32:
counter_transport_name = "counter-per-cpu-32-modular";
break;
default:
{
int err;
- err = lttng_ust_objd_unref(counter_objd, 1);
+ err = lttng_ust_abi_objd_unref(counter_objd, 1);
assert(!err);
}
objd_error:
static
long lttng_event_notifier_group_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
switch (cmd) {
- case LTTNG_UST_EVENT_NOTIFIER_CREATE:
+ case LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE:
{
- struct lttng_ust_event_notifier *event_notifier_param =
- (struct lttng_ust_event_notifier *) arg;
+ struct lttng_ust_abi_event_notifier *event_notifier_param =
+ (struct lttng_ust_abi_event_notifier *) arg;
if (strutils_is_star_glob_pattern(event_notifier_param->event.name)) {
/*
* If the event name is a star globbing pattern,
LTTNG_ENABLER_FORMAT_EVENT);
}
}
- case LTTNG_UST_COUNTER:
+ case LTTNG_UST_ABI_COUNTER:
{
- struct lttng_ust_counter_conf *counter_conf =
- (struct lttng_ust_counter_conf *) uargs->counter.counter_data;
+ struct lttng_ust_abi_counter_conf *counter_conf =
+ (struct lttng_ust_abi_counter_conf *) uargs->counter.counter_data;
return lttng_ust_event_notifier_group_create_error_counter(
objd, owner, counter_conf);
}
struct lttng_event_notifier_enabler *event_notifier_enabler = objd_private(objd);
if (event_notifier_enabler)
- return lttng_ust_objd_unref(event_notifier_enabler->group->objd, 0);
+ return lttng_ust_abi_objd_unref(event_notifier_enabler->group->objd, 0);
return 0;
}
-static const struct lttng_ust_objd_ops lttng_event_notifier_enabler_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_event_notifier_enabler_ops = {
.release = lttng_event_notifier_enabler_release,
.cmd = lttng_event_notifier_enabler_cmd,
};
}
}
-static const struct lttng_ust_objd_ops lttng_event_notifier_group_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_event_notifier_group_ops = {
.release = lttng_release_event_notifier_group,
.cmd = lttng_event_notifier_group_cmd,
};
static
long lttng_tracepoint_list_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_ust_tracepoint_list *list = objd_private(objd);
- struct lttng_ust_tracepoint_iter *tp =
- (struct lttng_ust_tracepoint_iter *) arg;
- struct lttng_ust_tracepoint_iter *iter;
+ struct lttng_ust_abi_tracepoint_iter *tp =
+ (struct lttng_ust_abi_tracepoint_iter *) arg;
+ struct lttng_ust_abi_tracepoint_iter *iter;
switch (cmd) {
- case LTTNG_UST_TRACEPOINT_LIST_GET:
+ case LTTNG_UST_ABI_TRACEPOINT_LIST_GET:
{
iter = lttng_ust_tracepoint_list_get_iter_next(list);
if (!iter)
{
int err;
- err = lttng_ust_objd_unref(list_objd, 1);
+ err = lttng_ust_abi_objd_unref(list_objd, 1);
assert(!err);
}
objd_error:
}
}
-static const struct lttng_ust_objd_ops lttng_tracepoint_list_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_tracepoint_list_ops = {
.release = lttng_release_tracepoint_list,
.cmd = lttng_tracepoint_list_cmd,
};
static
long lttng_tracepoint_field_list_cmd(int objd, unsigned int cmd,
- unsigned long arg, union ust_args *uargs, void *owner)
+ unsigned long arg, union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_ust_field_list *list = objd_private(objd);
- struct lttng_ust_field_iter *tp = &uargs->field_list.entry;
- struct lttng_ust_field_iter *iter;
+ struct lttng_ust_abi_field_iter *tp = &uargs->field_list.entry;
+ struct lttng_ust_abi_field_iter *iter;
switch (cmd) {
- case LTTNG_UST_TRACEPOINT_FIELD_LIST_GET:
+ case LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST_GET:
{
iter = lttng_ust_field_list_get_iter_next(list);
if (!iter)
{
int err;
- err = lttng_ust_objd_unref(list_objd, 1);
+ err = lttng_ust_abi_objd_unref(list_objd, 1);
assert(!err);
}
objd_error:
}
}
-static const struct lttng_ust_objd_ops lttng_tracepoint_field_list_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_tracepoint_field_list_ops = {
.release = lttng_release_tracepoint_field_list,
.cmd = lttng_tracepoint_field_list_cmd,
};
static
-int lttng_abi_map_stream(int channel_objd, struct lttng_ust_stream *info,
- union ust_args *uargs, void *owner)
+int lttng_abi_map_stream(int channel_objd, struct lttng_ust_abi_stream *info,
+ union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_channel *channel = objd_private(channel_objd);
int ret;
static
int lttng_abi_create_event_enabler(int channel_objd,
- struct lttng_ust_event *event_param,
+ struct lttng_ust_abi_event *event_param,
void *owner,
enum lttng_enabler_format_type format_type)
{
struct lttng_event_enabler *enabler;
int event_objd, ret;
- event_param->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+ event_param->name[LTTNG_UST_ABI_SYM_NAME_LEN - 1] = '\0';
event_objd = objd_alloc(NULL, <tng_event_enabler_ops, owner,
"event enabler");
if (event_objd < 0) {
{
int err;
- err = lttng_ust_objd_unref(event_objd, 1);
+ err = lttng_ust_abi_objd_unref(event_objd, 1);
assert(!err);
}
objd_error:
* @owner: objd owner
*
* This object descriptor implements lttng commands:
- * LTTNG_UST_STREAM
+ * LTTNG_UST_ABI_STREAM
* Returns an event stream object descriptor or failure.
* (typically, one event stream records events from one CPU)
- * LTTNG_UST_EVENT
+ * LTTNG_UST_ABI_EVENT
* Returns an event object descriptor or failure.
- * LTTNG_UST_CONTEXT
+ * LTTNG_UST_ABI_CONTEXT
* Prepend a context field to each event in the channel
- * LTTNG_UST_ENABLE
+ * LTTNG_UST_ABI_ENABLE
* Enable recording for events in this channel (weak enable)
- * LTTNG_UST_DISABLE
+ * LTTNG_UST_ABI_DISABLE
* Disable recording for events in this channel (strong disable)
*
* Channel and event file descriptors also hold a reference on the session.
*/
static
long lttng_channel_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_channel *channel = objd_private(objd);
- if (cmd != LTTNG_UST_STREAM) {
+ if (cmd != LTTNG_UST_ABI_STREAM) {
/*
* Check if channel received all streams.
*/
}
switch (cmd) {
- case LTTNG_UST_STREAM:
+ case LTTNG_UST_ABI_STREAM:
{
- struct lttng_ust_stream *stream;
+ struct lttng_ust_abi_stream *stream;
- stream = (struct lttng_ust_stream *) arg;
+ stream = (struct lttng_ust_abi_stream *) arg;
/* stream used as output */
return lttng_abi_map_stream(objd, stream, uargs, owner);
}
- case LTTNG_UST_EVENT:
+ case LTTNG_UST_ABI_EVENT:
{
- struct lttng_ust_event *event_param =
- (struct lttng_ust_event *) arg;
+ struct lttng_ust_abi_event *event_param =
+ (struct lttng_ust_abi_event *) arg;
if (strutils_is_star_glob_pattern(event_param->name)) {
/*
owner, LTTNG_ENABLER_FORMAT_EVENT);
}
}
- case LTTNG_UST_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT:
return lttng_abi_add_context(objd,
- (struct lttng_ust_context *) arg, uargs,
+ (struct lttng_ust_abi_context *) arg, uargs,
&channel->ctx, channel->session);
- case LTTNG_UST_ENABLE:
+ case LTTNG_UST_ABI_ENABLE:
return lttng_channel_enable(channel);
- case LTTNG_UST_DISABLE:
+ case LTTNG_UST_ABI_DISABLE:
return lttng_channel_disable(channel);
- case LTTNG_UST_FLUSH_BUFFER:
+ case LTTNG_UST_ABI_FLUSH_BUFFER:
return channel->ops->flush_buffer(channel->chan, channel->handle);
default:
return -EINVAL;
struct lttng_channel *channel = objd_private(objd);
if (channel)
- return lttng_ust_objd_unref(channel->session->priv->objd, 0);
+ return lttng_ust_abi_objd_unref(channel->session->priv->objd, 0);
return 0;
}
-static const struct lttng_ust_objd_ops lttng_channel_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_channel_ops = {
.release = lttng_channel_release,
.cmd = lttng_channel_cmd,
};
* @owner: objd owner
*
* This object descriptor implements lttng commands:
- * LTTNG_UST_CONTEXT
+ * LTTNG_UST_ABI_CONTEXT
* Prepend a context field to each record of events of this
* enabler.
- * LTTNG_UST_ENABLE
+ * LTTNG_UST_ABI_ENABLE
* Enable recording for this enabler
- * LTTNG_UST_DISABLE
+ * LTTNG_UST_ABI_DISABLE
* Disable recording for this enabler
- * LTTNG_UST_FILTER
+ * LTTNG_UST_ABI_FILTER
* Attach a filter to an enabler.
- * LTTNG_UST_EXCLUSION
+ * LTTNG_UST_ABI_EXCLUSION
* Attach exclusions to an enabler.
*/
static
long lttng_event_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
- union ust_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner)
{
struct lttng_event_enabler *enabler = objd_private(objd);
switch (cmd) {
- case LTTNG_UST_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT:
return lttng_event_enabler_attach_context(enabler,
- (struct lttng_ust_context *) arg);
- case LTTNG_UST_ENABLE:
+ (struct lttng_ust_abi_context *) arg);
+ case LTTNG_UST_ABI_ENABLE:
return lttng_event_enabler_enable(enabler);
- case LTTNG_UST_DISABLE:
+ case LTTNG_UST_ABI_DISABLE:
return lttng_event_enabler_disable(enabler);
- case LTTNG_UST_FILTER:
+ case LTTNG_UST_ABI_FILTER:
{
int ret;
return ret;
return 0;
}
- case LTTNG_UST_EXCLUSION:
+ case LTTNG_UST_ABI_EXCLUSION:
{
return lttng_event_enabler_attach_exclusion(enabler,
(struct lttng_ust_excluder_node **) arg);
struct lttng_event_enabler *event_enabler = objd_private(objd);
if (event_enabler)
- return lttng_ust_objd_unref(event_enabler->chan->objd, 0);
+ return lttng_ust_abi_objd_unref(event_enabler->chan->objd, 0);
return 0;
}
-static const struct lttng_ust_objd_ops lttng_event_enabler_ops = {
+static const struct lttng_ust_abi_objd_ops lttng_event_enabler_ops = {
.release = lttng_event_enabler_release,
.cmd = lttng_event_enabler_cmd,
};
static int wait_poll_fallback;
static const char *cmd_name_mapping[] = {
- [ LTTNG_UST_RELEASE ] = "Release",
- [ LTTNG_UST_SESSION ] = "Create Session",
- [ LTTNG_UST_TRACER_VERSION ] = "Get Tracer Version",
+ [ LTTNG_UST_ABI_RELEASE ] = "Release",
+ [ LTTNG_UST_ABI_SESSION ] = "Create Session",
+ [ LTTNG_UST_ABI_TRACER_VERSION ] = "Get Tracer Version",
- [ LTTNG_UST_TRACEPOINT_LIST ] = "Create Tracepoint List",
- [ LTTNG_UST_WAIT_QUIESCENT ] = "Wait for Quiescent State",
- [ LTTNG_UST_REGISTER_DONE ] = "Registration Done",
- [ LTTNG_UST_TRACEPOINT_FIELD_LIST ] = "Create Tracepoint Field List",
+ [ LTTNG_UST_ABI_TRACEPOINT_LIST ] = "Create Tracepoint List",
+ [ LTTNG_UST_ABI_WAIT_QUIESCENT ] = "Wait for Quiescent State",
+ [ LTTNG_UST_ABI_REGISTER_DONE ] = "Registration Done",
+ [ LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST ] = "Create Tracepoint Field List",
- [ LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE ] = "Create event notifier group",
+ [ LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE ] = "Create event notifier group",
/* Session FD commands */
- [ LTTNG_UST_CHANNEL ] = "Create Channel",
- [ LTTNG_UST_SESSION_START ] = "Start Session",
- [ LTTNG_UST_SESSION_STOP ] = "Stop Session",
+ [ LTTNG_UST_ABI_CHANNEL ] = "Create Channel",
+ [ LTTNG_UST_ABI_SESSION_START ] = "Start Session",
+ [ LTTNG_UST_ABI_SESSION_STOP ] = "Stop Session",
/* Channel FD commands */
- [ LTTNG_UST_STREAM ] = "Create Stream",
- [ LTTNG_UST_EVENT ] = "Create Event",
+ [ LTTNG_UST_ABI_STREAM ] = "Create Stream",
+ [ LTTNG_UST_ABI_EVENT ] = "Create Event",
/* Event and Channel FD commands */
- [ LTTNG_UST_CONTEXT ] = "Create Context",
- [ LTTNG_UST_FLUSH_BUFFER ] = "Flush Buffer",
+ [ LTTNG_UST_ABI_CONTEXT ] = "Create Context",
+ [ LTTNG_UST_ABI_FLUSH_BUFFER ] = "Flush Buffer",
/* Event, Channel and Session commands */
- [ LTTNG_UST_ENABLE ] = "Enable",
- [ LTTNG_UST_DISABLE ] = "Disable",
+ [ LTTNG_UST_ABI_ENABLE ] = "Enable",
+ [ LTTNG_UST_ABI_DISABLE ] = "Disable",
/* Tracepoint list commands */
- [ LTTNG_UST_TRACEPOINT_LIST_GET ] = "List Next Tracepoint",
- [ LTTNG_UST_TRACEPOINT_FIELD_LIST_GET ] = "List Next Tracepoint Field",
+ [ LTTNG_UST_ABI_TRACEPOINT_LIST_GET ] = "List Next Tracepoint",
+ [ LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST_GET ] = "List Next Tracepoint Field",
/* Event FD commands */
- [ LTTNG_UST_FILTER ] = "Create Filter",
- [ LTTNG_UST_EXCLUSION ] = "Add exclusions to event",
+ [ LTTNG_UST_ABI_FILTER ] = "Create Filter",
+ [ LTTNG_UST_ABI_EXCLUSION ] = "Add exclusions to event",
/* Event notifier group commands */
- [ LTTNG_UST_EVENT_NOTIFIER_CREATE ] = "Create event notifier",
+ [ LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE ] = "Create event notifier",
/* Session and event notifier group commands */
- [ LTTNG_UST_COUNTER ] = "Create Counter",
+ [ LTTNG_UST_ABI_COUNTER ] = "Create Counter",
/* Counter commands */
- [ LTTNG_UST_COUNTER_GLOBAL ] = "Create Counter Global",
- [ LTTNG_UST_COUNTER_CPU ] = "Create Counter CPU",
+ [ LTTNG_UST_ABI_COUNTER_GLOBAL ] = "Create Counter Global",
+ [ LTTNG_UST_ABI_COUNTER_CPU ] = "Create Counter CPU",
};
static const char *str_timeout;
const char *bytecode_type_str(uint32_t cmd)
{
switch (cmd) {
- case LTTNG_UST_CAPTURE:
+ case LTTNG_UST_ABI_CAPTURE:
return "capture";
- case LTTNG_UST_FILTER:
+ case LTTNG_UST_ABI_FILTER:
return "filter";
default:
abort();
{
struct lttng_ust_bytecode_node *bytecode = NULL;
enum lttng_ust_bytecode_node_type type;
- const struct lttng_ust_objd_ops *ops;
+ const struct lttng_ust_abi_objd_ops *ops;
uint32_t data_size, data_size_max, reloc_offset;
uint64_t seqnum;
ssize_t len;
int ret = 0;
switch (lum->cmd) {
- case LTTNG_UST_FILTER:
+ case LTTNG_UST_ABI_FILTER:
type = LTTNG_UST_BYTECODE_NODE_TYPE_FILTER;
data_size = lum->u.filter.data_size;
- data_size_max = FILTER_BYTECODE_MAX_LEN;
+ data_size_max = LTTNG_UST_ABI_FILTER_BYTECODE_MAX_LEN;
reloc_offset = lum->u.filter.reloc_offset;
seqnum = lum->u.filter.seqnum;
break;
- case LTTNG_UST_CAPTURE:
+ case LTTNG_UST_ABI_CAPTURE:
type = LTTNG_UST_BYTECODE_NODE_TYPE_CAPTURE;
data_size = lum->u.capture.data_size;
- data_size_max = CAPTURE_BYTECODE_MAX_LEN;
+ data_size_max = LTTNG_UST_ABI_CAPTURE_BYTECODE_MAX_LEN;
reloc_offset = lum->u.capture.reloc_offset;
seqnum = lum->u.capture.seqnum;
break;
}
}
- ops = objd_ops(lum->handle);
+ ops = lttng_ust_abi_objd_ops(lum->handle);
if (!ops) {
ret = -ENOENT;
goto end;
int sock, struct ustcomm_ust_msg *lum)
{
int ret = 0;
- const struct lttng_ust_objd_ops *ops;
+ const struct lttng_ust_abi_objd_ops *ops;
struct ustcomm_ust_reply lur;
- union ust_args args;
- char ctxstr[LTTNG_UST_SYM_NAME_LEN]; /* App context string. */
+ union lttng_ust_abi_args args;
+ char ctxstr[LTTNG_UST_ABI_SYM_NAME_LEN]; /* App context string. */
ssize_t len;
memset(&lur, 0, sizeof(lur));
goto error;
}
- ops = objd_ops(lum->handle);
+ ops = lttng_ust_abi_objd_ops(lum->handle);
if (!ops) {
ret = -ENOENT;
goto error;
}
switch (lum->cmd) {
- case LTTNG_UST_REGISTER_DONE:
- if (lum->handle == LTTNG_UST_ROOT_HANDLE)
+ case LTTNG_UST_ABI_REGISTER_DONE:
+ if (lum->handle == LTTNG_UST_ABI_ROOT_HANDLE)
ret = handle_register_done(sock_info);
else
ret = -EINVAL;
break;
- case LTTNG_UST_RELEASE:
- if (lum->handle == LTTNG_UST_ROOT_HANDLE)
+ case LTTNG_UST_ABI_RELEASE:
+ if (lum->handle == LTTNG_UST_ABI_ROOT_HANDLE)
ret = -EPERM;
else
- ret = lttng_ust_objd_unref(lum->handle, 1);
+ ret = lttng_ust_abi_objd_unref(lum->handle, 1);
break;
- case LTTNG_UST_CAPTURE:
- case LTTNG_UST_FILTER:
+ case LTTNG_UST_ABI_CAPTURE:
+ case LTTNG_UST_ABI_FILTER:
ret = handle_bytecode_recv(sock_info, sock, lum);
if (ret)
goto error;
break;
- case LTTNG_UST_EXCLUSION:
+ case LTTNG_UST_ABI_EXCLUSION:
{
/* Receive exclusion names */
struct lttng_ust_excluder_node *node;
goto error;
}
node = zmalloc(sizeof(*node) +
- count * LTTNG_UST_SYM_NAME_LEN);
+ count * LTTNG_UST_ABI_SYM_NAME_LEN);
if (!node) {
ret = -ENOMEM;
goto error;
}
node->excluder.count = count;
len = ustcomm_recv_unix_sock(sock, node->excluder.names,
- count * LTTNG_UST_SYM_NAME_LEN);
+ count * LTTNG_UST_ABI_SYM_NAME_LEN);
switch (len) {
case 0: /* orderly shutdown */
ret = 0;
free(node);
goto error;
default:
- if (len == count * LTTNG_UST_SYM_NAME_LEN) {
+ if (len == count * LTTNG_UST_ABI_SYM_NAME_LEN) {
DBG("Exclusion data received");
break;
} else if (len < 0) {
free(node);
break;
}
- case LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE:
+ case LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE:
{
int event_notifier_notif_fd, close_ret;
}
break;
}
- case LTTNG_UST_CHANNEL:
+ case LTTNG_UST_ABI_CHANNEL:
{
void *chan_data;
int wakeup_fd;
free(args.channel.chan_data);
break;
}
- case LTTNG_UST_STREAM:
+ case LTTNG_UST_ABI_STREAM:
{
int close_ret;
}
break;
}
- case LTTNG_UST_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT:
switch (lum->u.context.ctx) {
- case LTTNG_UST_CONTEXT_APP_CONTEXT:
+ case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
{
char *p;
size_t ctxlen, recvlen;
ctxlen = strlen("$app.") + lum->u.context.u.app_ctx.provider_name_len - 1
+ strlen(":") + lum->u.context.u.app_ctx.ctx_name_len;
- if (ctxlen >= LTTNG_UST_SYM_NAME_LEN) {
+ if (ctxlen >= LTTNG_UST_ABI_SYM_NAME_LEN) {
ERR("Application context string length size is too large: %zu bytes",
ctxlen);
ret = -EINVAL;
ret = -ENOSYS;
}
break;
- case LTTNG_UST_COUNTER:
+ case LTTNG_UST_ABI_COUNTER:
{
void *counter_data;
free(args.counter.counter_data);
break;
}
- case LTTNG_UST_COUNTER_GLOBAL:
+ case LTTNG_UST_ABI_COUNTER_GLOBAL:
{
/* Receive shm_fd */
ret = ustcomm_recv_counter_shm_from_sessiond(sock,
}
break;
}
- case LTTNG_UST_COUNTER_CPU:
+ case LTTNG_UST_ABI_COUNTER_CPU:
{
/* Receive shm_fd */
ret = ustcomm_recv_counter_shm_from_sessiond(sock,
}
break;
}
- case LTTNG_UST_EVENT_NOTIFIER_CREATE:
+ case LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE:
{
/* Receive struct lttng_ust_event_notifier */
- struct lttng_ust_event_notifier event_notifier;
+ struct lttng_ust_abi_event_notifier event_notifier;
if (sizeof(event_notifier) != lum->u.event_notifier.len) {
DBG("incorrect event notifier data message size: %u", lum->u.event_notifier.len);
}
if (ret >= 0) {
switch (lum->cmd) {
- case LTTNG_UST_TRACER_VERSION:
+ case LTTNG_UST_ABI_TRACER_VERSION:
lur.u.version = lum->u.version;
break;
- case LTTNG_UST_TRACEPOINT_LIST_GET:
+ case LTTNG_UST_ABI_TRACEPOINT_LIST_GET:
memcpy(&lur.u.tracepoint, &lum->u.tracepoint, sizeof(lur.u.tracepoint));
break;
}
*/
if (lur.ret_code == LTTNG_UST_OK) {
switch (lum->cmd) {
- case LTTNG_UST_TRACEPOINT_FIELD_LIST_GET:
+ case LTTNG_UST_ABI_TRACEPOINT_FIELD_LIST_GET:
len = ustcomm_send_unix_sock(sock,
&args.field_list.entry,
sizeof(args.field_list.entry));
int ret;
if (sock_info->root_handle != -1) {
- ret = lttng_ust_objd_unref(sock_info->root_handle, 1);
+ ret = lttng_ust_abi_objd_unref(sock_info->root_handle, 1);
if (ret) {
ERR("Error unref root handle");
}
goto quit;
}
/* Cleanup socket handles before trying to reconnect */
- lttng_ust_objd_table_owner_cleanup(sock_info);
+ lttng_ust_abi_objd_table_owner_cleanup(sock_info);
ust_unlock();
goto restart; /* try to reconnect */
* point.
*/
lttng_ust_abi_exit();
- lttng_ust_events_exit();
+ lttng_ust_abi_events_exit();
lttng_perf_counter_exit();
lttng_ring_buffer_client_discard_rt_exit();
lttng_ring_buffer_client_discard_exit();
#include <urcu/system.h>
#include <lttng/tracepoint.h>
-#include <lttng/ust-abi.h> /* for LTTNG_UST_SYM_NAME_LEN */
+#include <lttng/ust-abi.h> /* for LTTNG_UST_ABI_SYM_NAME_LEN */
#include <usterr-signal-safe.h>
#include <ust-helper.h>
size_t name_len = strlen(name);
uint32_t hash;
- if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
- WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
- name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+ if (name_len > LTTNG_UST_ABI_SYM_NAME_LEN - 1) {
+ WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_ABI_SYM_NAME_LEN - 1);
+ name_len = LTTNG_UST_ABI_SYM_NAME_LEN - 1;
}
hash = jhash(name, name_len, 0);
head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)];
cds_hlist_for_each_entry(e, node, head, hlist) {
- if (!strncmp(name, e->name, LTTNG_UST_SYM_NAME_LEN - 1))
+ if (!strncmp(name, e->name, LTTNG_UST_ABI_SYM_NAME_LEN - 1))
return e;
}
return NULL;
size_t sig_off, name_off;
uint32_t hash;
- if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
- WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
- name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+ if (name_len > LTTNG_UST_ABI_SYM_NAME_LEN - 1) {
+ WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_ABI_SYM_NAME_LEN - 1);
+ name_len = LTTNG_UST_ABI_SYM_NAME_LEN - 1;
}
hash = jhash(name, name_len, 0);
head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)];
cds_hlist_for_each_entry(e, node, head, hlist) {
- if (!strncmp(name, e->name, LTTNG_UST_SYM_NAME_LEN - 1)) {
+ if (!strncmp(name, e->name, LTTNG_UST_ABI_SYM_NAME_LEN - 1)) {
DBG("tracepoint %s busy", name);
return ERR_PTR(-EEXIST); /* Already there */
}
static void set_tracepoint(struct tracepoint_entry **entry,
struct lttng_ust_tracepoint *elem, int active)
{
- WARN_ON(strncmp((*entry)->name, elem->name, LTTNG_UST_SYM_NAME_LEN - 1) != 0);
+ WARN_ON(strncmp((*entry)->name, elem->name, LTTNG_UST_ABI_SYM_NAME_LEN - 1) != 0);
/*
* Check that signatures match before connecting a probe to a
* tracepoint. Warn the user if they don't.
uint32_t hash;
struct tracepoint_entry *tp_entry;
- if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
- WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
- name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+ if (name_len > LTTNG_UST_ABI_SYM_NAME_LEN - 1) {
+ WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_ABI_SYM_NAME_LEN - 1);
+ name_len = LTTNG_UST_ABI_SYM_NAME_LEN - 1;
}
hash = jhash(name, name_len, 0);
head = &callsite_table[hash & (CALLSITE_TABLE_SIZE - 1)];
struct tracepoint_entry *tp_entry;
tp_entry = get_tracepoint(name);
- if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
- WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
- name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+ if (name_len > LTTNG_UST_ABI_SYM_NAME_LEN - 1) {
+ WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_ABI_SYM_NAME_LEN - 1);
+ name_len = LTTNG_UST_ABI_SYM_NAME_LEN - 1;
}
hash = jhash(name, name_len, 0);
head = &callsite_table[hash & (CALLSITE_TABLE_SIZE - 1)];
cds_hlist_for_each_entry(e, node, head, hlist) {
struct lttng_ust_tracepoint *tp = e->tp;
- if (strncmp(name, tp->name, LTTNG_UST_SYM_NAME_LEN - 1))
+ if (strncmp(name, tp->name, LTTNG_UST_ABI_SYM_NAME_LEN - 1))
continue;
if (tp_entry) {
if (!e->tp_entry_callsite_ref) {
#include <ust-helper.h>
#include <lttng/ust-events.h>
+
+struct lttng_ust_abi_obj;
+
+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,
/* head list of struct lttng_ust_excluder_node */
struct cds_list_head excluder_head;
- struct lttng_ust_event event_param;
+ struct lttng_ust_abi_event event_param;
unsigned int enabled:1;
};
* struct lttng_ust_event_exclusion had variable sized array,
* must be last field.
*/
- struct lttng_ust_event_exclusion excluder;
+ struct lttng_ust_abi_event_exclusion excluder;
};
/* Data structures used by the tracer. */
struct tp_list_entry {
- struct lttng_ust_tracepoint_iter tp;
+ struct lttng_ust_abi_tracepoint_iter tp;
struct cds_list_head head;
};
};
struct tp_field_list_entry {
- struct lttng_ust_field_iter field;
+ struct lttng_ust_abi_field_iter field;
struct cds_list_head head;
};
LTTNG_HIDDEN
struct lttng_event_enabler *lttng_event_enabler_create(
enum lttng_enabler_format_type format_type,
- struct lttng_ust_event *event_param,
+ struct lttng_ust_abi_event *event_param,
struct lttng_channel *chan);
/*
*/
LTTNG_HIDDEN
int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
- struct lttng_ust_context *ctx);
+ struct lttng_ust_abi_context *ctx);
/*
* Attach exclusion list to `struct lttng_event_enabler` and all
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_event_notifier *event_notifier_param);
+ struct lttng_ust_abi_event_notifier *event_notifier_param);
/*
* Destroy a `struct lttng_event_notifier_enabler` object.
void lttng_probes_prune_field_list(struct lttng_ust_field_list *list);
LTTNG_HIDDEN
-struct lttng_ust_tracepoint_iter *
+struct lttng_ust_abi_tracepoint_iter *
lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list);
LTTNG_HIDDEN
-struct lttng_ust_field_iter *
+struct lttng_ust_abi_field_iter *
lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list);
LTTNG_HIDDEN
struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_session *session,
const struct lttng_enum_desc *enum_desc);
+LTTNG_HIDDEN
+int lttng_abi_create_root_handle(void);
+
+LTTNG_HIDDEN
+const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id);
+LTTNG_HIDDEN
+int lttng_ust_abi_objd_unref(int id, int is_owner);
+LTTNG_HIDDEN
+void lttng_ust_abi_exit(void);
+LTTNG_HIDDEN
+void lttng_ust_abi_events_exit(void);
+LTTNG_HIDDEN
+void lttng_ust_abi_objd_table_owner_cleanup(void *owner);
+
#endif /* _LTTNG_UST_EVENTS_INTERNAL_H */