From: Mathieu Desnoyers Date: Fri, 12 Mar 2021 20:11:02 +0000 (-0500) Subject: Refactoring: namespace ust-abi.h content under regular prefix X-Git-Tag: v2.13.0-rc1~300 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fd17d7cecd427479c035cd99cb2b2fb622bb3a38;p=lttng-ust.git Refactoring: namespace ust-abi.h content under regular prefix Eliminates namespace clashes within lttng-ust. Use the LTTNG_UST_ABI_ and lttng_ust_abi_ prefixes for all symbols and defines in lttng/ust-abi.h. Signed-off-by: Mathieu Desnoyers Change-Id: Ic31956416ec384a23023d9c69b140a3694edc839 --- diff --git a/include/lttng/ust-abi.h b/include/lttng/ust-abi.h index fd7180a1..fe253566 100644 --- a/include/lttng/ust-abi.h +++ b/include/lttng/ust-abi.h @@ -21,83 +21,83 @@ #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; @@ -105,192 +105,192 @@ struct lttng_ust_counter_dimension { 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 { @@ -308,162 +308,119 @@ struct lttng_ust_object_data { 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 */ diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index 6bea1160..8b040e2c 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -41,13 +41,13 @@ struct lttng_ust_shm_handle; 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) */ @@ -58,9 +58,9 @@ struct ustctl_consumer_channel_attr { */ 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; @@ -75,21 +75,21 @@ struct lttng_ust_context_attr { */ 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); @@ -101,7 +101,7 @@ 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 @@ -111,9 +111,9 @@ int ustctl_create_event_notifier_group(int sock, int pipe_fd, * 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 @@ -127,7 +127,7 @@ int ustctl_tracepoint_list(int sock); * 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, @@ -141,37 +141,37 @@ int ustctl_tracepoint_field_list(int sock); * 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. @@ -383,7 +383,7 @@ enum ustctl_ust_enum_entry_options { #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; @@ -397,7 +397,7 @@ struct ustctl_enum_entry { 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; @@ -430,7 +430,7 @@ struct ustctl_type { 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; @@ -440,7 +440,7 @@ struct ustctl_type { /* 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; @@ -451,7 +451,7 @@ struct ustctl_type { } 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; @@ -473,7 +473,7 @@ struct ustctl_type { } _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; @@ -483,7 +483,7 @@ struct ustctl_type { #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; @@ -527,7 +527,7 @@ int ustctl_recv_register_event(int sock, 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, /* @@ -626,12 +626,12 @@ struct ustctl_daemon_counter * 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 @@ -640,13 +640,13 @@ int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cp 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, diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 997a449b..d102b0b5 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -456,7 +456,7 @@ struct lttng_channel { /* 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 */ }; diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index c07613f5..b30a6dc4 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -107,7 +107,7 @@ void _TP_COMBINE_TOKENS(__tracepoint_provider_check_, TRACEPOINT_PROVIDER)(void) #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; diff --git a/include/ust-comm.h b/include/ust-comm.h index 27743b2d..bc185669 100644 --- a/include/ust-comm.h +++ b/include/ust-comm.h @@ -77,12 +77,12 @@ struct ustcomm_ust_msg { 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; @@ -96,16 +96,16 @@ struct ustcomm_ust_msg { 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]; @@ -131,8 +131,8 @@ struct ustcomm_ust_reply { 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; @@ -145,7 +145,7 @@ struct ustcomm_notify_hdr { 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; @@ -164,7 +164,7 @@ struct ustcomm_notify_event_reply { #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 */ diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 21adf183..cfd4ddf6 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -606,7 +606,7 @@ ssize_t ustcomm_recv_channel_from_sessiond(int sock, 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; } @@ -761,7 +761,7 @@ ssize_t ustcomm_recv_counter_from_sessiond(int sock, 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; } @@ -839,7 +839,7 @@ int ustcomm_send_reg_msg(int sock, 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(); @@ -992,7 +992,7 @@ int serialize_dynamic_type(struct lttng_session *session, 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 = { @@ -1007,11 +1007,11 @@ int serialize_dynamic_type(struct lttng_session *session, 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); @@ -1024,14 +1024,14 @@ int serialize_dynamic_type(struct lttng_session *session, 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)++; @@ -1064,8 +1064,8 @@ int serialize_one_type(struct lttng_session *session, 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'; } @@ -1084,8 +1084,8 @@ int serialize_one_type(struct lttng_session *session, 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'; } @@ -1106,8 +1106,8 @@ int serialize_one_type(struct lttng_session *session, 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'; } @@ -1125,8 +1125,8 @@ int serialize_one_type(struct lttng_session *session, 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'; } @@ -1147,16 +1147,16 @@ int serialize_one_type(struct lttng_session *session, 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)++; @@ -1179,8 +1179,8 @@ int serialize_one_type(struct lttng_session *session, 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'; } @@ -1202,14 +1202,14 @@ int serialize_one_type(struct lttng_session *session, 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)++; @@ -1323,8 +1323,8 @@ int serialize_entries(struct ustctl_enum_entry **_entries, 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 |= @@ -1406,8 +1406,8 @@ int ustcomm_register_event(int sock, 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; @@ -1542,8 +1542,8 @@ int ustcomm_register_enum(int sock, 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) { diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 041434bd..e7ce1f88 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -112,7 +112,7 @@ int ustctl_release_handle(int sock, int handle) 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); } @@ -120,7 +120,7 @@ int ustctl_release_handle(int sock, int handle) * 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; @@ -128,7 +128,7 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) 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) { @@ -140,7 +140,7 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) 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) { @@ -158,16 +158,16 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) 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) { @@ -177,7 +177,7 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) 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) { @@ -204,8 +204,8 @@ int ustctl_register_done(int sock) 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; @@ -223,8 +223,8 @@ int ustctl_create_session(int sock) /* 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; @@ -233,13 +233,13 @@ int ustctl_create_session(int sock) 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) @@ -248,12 +248,12 @@ int ustctl_create_event(int sock, struct lttng_ust_event *ev, 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; @@ -269,12 +269,12 @@ int ustctl_create_event(int sock, struct lttng_ust_event *ev, } 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; @@ -289,17 +289,17 @@ int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx, 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; @@ -351,8 +351,8 @@ end: 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; @@ -363,7 +363,7 @@ int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode, 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; @@ -382,8 +382,8 @@ int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode, 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; @@ -394,7 +394,7 @@ int ustctl_set_capture(int sock, struct lttng_ust_capture_bytecode *bytecode, 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; @@ -413,8 +413,8 @@ int ustctl_set_capture(int sock, struct lttng_ust_capture_bytecode *bytecode, 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; @@ -426,7 +426,7 @@ int ustctl_set_exclusion(int sock, struct lttng_ust_event_exclusion *exclusion, 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); @@ -437,18 +437,18 @@ int ustctl_set_exclusion(int sock, struct lttng_ust_event_exclusion *exclusion, /* 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; @@ -459,7 +459,7 @@ int ustctl_enable(int sock, struct lttng_ust_object_data *object) 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; @@ -468,7 +468,7 @@ int ustctl_enable(int sock, struct lttng_ust_object_data *object) } /* 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; @@ -479,7 +479,7 @@ int ustctl_disable(int sock, struct lttng_ust_object_data *object) 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; @@ -489,7 +489,7 @@ int ustctl_disable(int sock, struct lttng_ust_object_data *object) 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); @@ -497,16 +497,16 @@ int ustctl_start_session(int sock, int handle) 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; @@ -519,11 +519,11 @@ int ustctl_create_event_notifier_group(int sock, int pipe_fd, 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) @@ -554,13 +554,13 @@ end: 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; @@ -571,11 +571,11 @@ int ustctl_create_event_notifier(int sock, struct lttng_ust_event_notifier *even 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); @@ -610,8 +610,8 @@ int ustctl_tracepoint_list(int sock) 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; @@ -621,7 +621,7 @@ int ustctl_tracepoint_list(int sock) } 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; @@ -632,7 +632,7 @@ int ustctl_tracepoint_list_get(int sock, int tp_list_handle, 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; @@ -650,8 +650,8 @@ int ustctl_tracepoint_field_list(int sock) 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; @@ -661,7 +661,7 @@ int ustctl_tracepoint_field_list(int sock) } 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; @@ -673,7 +673,7 @@ int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle, 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; @@ -689,7 +689,7 @@ int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle, 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; @@ -699,8 +699,8 @@ int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v) 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; @@ -716,8 +716,8 @@ int ustctl_wait_quiescent(int sock) 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; @@ -725,7 +725,7 @@ int ustctl_wait_quiescent(int sock) 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; @@ -733,7 +733,7 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate) 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; @@ -744,7 +744,7 @@ int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object) 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; @@ -754,7 +754,7 @@ int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object) 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, @@ -862,9 +862,9 @@ int ustctl_send_stream(int sock, } 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; @@ -874,7 +874,7 @@ int ustctl_recv_channel_from_consumer(int sock, 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 */ @@ -938,9 +938,9 @@ error_alloc: } 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]; @@ -951,7 +951,7 @@ int ustctl_recv_stream_from_consumer(int sock, 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 */ @@ -1003,7 +1003,7 @@ error_alloc: } 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; @@ -1014,7 +1014,7 @@ int ustctl_send_channel_to_ust(int sock, int session_handle, 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); @@ -1037,8 +1037,8 @@ int ustctl_send_channel_to_ust(int sock, int session_handle, } 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; @@ -1046,7 +1046,7 @@ int ustctl_send_stream_to_ust(int sock, 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); @@ -1054,7 +1054,7 @@ int ustctl_send_stream_to_ust(int sock, 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, @@ -1066,10 +1066,10 @@ int ustctl_send_stream_to_ust(int sock, 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) { @@ -1088,7 +1088,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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) { @@ -1124,7 +1124,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, } - 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) { @@ -1165,7 +1165,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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) { @@ -1176,7 +1176,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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 = @@ -1189,7 +1189,7 @@ int ustctl_duplicate_ust_object_data(struct lttng_ust_object_data **dest, 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) { @@ -1234,8 +1234,8 @@ struct ustctl_consumer_channel * 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"; @@ -1253,8 +1253,8 @@ struct ustctl_consumer_channel * 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; @@ -2146,10 +2146,10 @@ int ustctl_recv_reg_msg(int sock, 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 { @@ -2236,8 +2236,8 @@ int ustctl_recv_register_event(int sock, *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; @@ -2376,8 +2376,8 @@ int ustctl_recv_register_enum(int sock, 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) { @@ -2545,7 +2545,7 @@ int ustctl_regenerate_statedump(int sock, int handle) 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; @@ -2663,29 +2663,29 @@ free_counter: } 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; @@ -2706,7 +2706,7 @@ int ustctl_create_counter_data(struct ustctl_daemon_counter *counter, 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); @@ -2728,9 +2728,9 @@ error_alloc: } 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; @@ -2741,7 +2741,7 @@ int ustctl_create_counter_global_data(struct ustctl_daemon_counter *counter, 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; @@ -2753,9 +2753,9 @@ error_alloc: } 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; @@ -2766,7 +2766,7 @@ int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cp 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; @@ -2786,7 +2786,7 @@ 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) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; @@ -2800,7 +2800,7 @@ int ustctl_send_counter_data_to_ust(int sock, int parent_handle, 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) @@ -2823,8 +2823,8 @@ int ustctl_send_counter_data_to_ust(int sock, int parent_handle, } 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; @@ -2838,7 +2838,7 @@ int ustctl_send_counter_global_data_to_ust(int sock, 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) @@ -2861,8 +2861,8 @@ int ustctl_send_counter_global_data_to_ust(int sock, } 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; @@ -2876,7 +2876,7 @@ int ustctl_send_counter_cpu_data_to_ust(int sock, 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); diff --git a/liblttng-ust/context-internal.h b/liblttng-ust/context-internal.h index 4a546d35..43c5513b 100644 --- a/liblttng-ust/context-internal.h +++ b/liblttng-ust/context-internal.h @@ -9,13 +9,14 @@ #include #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 diff --git a/liblttng-ust/event-notifier-notification.c b/liblttng-ust/event-notifier-notification.c index f8bad6db..ffb13321 100644 --- a/liblttng-ust/event-notifier-notification.c +++ b/liblttng-ust/event-notifier-notification.c @@ -24,7 +24,7 @@ * 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; @@ -301,7 +301,7 @@ void notification_send(struct lttng_event_notifier_notification *notif, 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); diff --git a/liblttng-ust/lttng-bytecode.c b/liblttng-ust/lttng-bytecode.c index c5b3c133..69dcd76b 100644 --- a/liblttng-ust/lttng-bytecode.c +++ b/liblttng-ust/lttng-bytecode.c @@ -225,7 +225,7 @@ int apply_field_reloc(const struct lttng_event_desc *event_desc, 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 */ @@ -297,7 +297,7 @@ int apply_context_reloc(struct bytecode_runtime *runtime, } } /* 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 */ diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index f8936e3d..52ed43cc 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -102,25 +102,25 @@ int lttng_session_active(void) 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; @@ -1003,8 +1003,8 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc, 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; } @@ -1395,7 +1395,7 @@ void _lttng_enum_destroy(struct lttng_enum *_enum) free(_enum); } -void lttng_ust_events_exit(void) +void lttng_ust_abi_events_exit(void) { struct lttng_ust_session_private *session_priv, *tmpsession_priv; @@ -1408,7 +1408,7 @@ void lttng_ust_events_exit(void) */ 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; @@ -1433,7 +1433,7 @@ struct lttng_event_enabler *lttng_event_enabler_create( 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; @@ -1584,8 +1584,8 @@ int lttng_event_notifier_enabler_attach_exclusion( 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) { /* @@ -1597,11 +1597,11 @@ int lttng_attach_context(struct lttng_ust_context *context_param, 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( @@ -1610,46 +1610,46 @@ int lttng_attach_context(struct lttng_ust_context *context_param, 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; @@ -1657,7 +1657,7 @@ int lttng_attach_context(struct lttng_ust_context *context_param, } 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; } diff --git a/liblttng-ust/lttng-probes.c b/liblttng-ust/lttng-probes.c index d518a41d..3d3e60e7 100644 --- a/liblttng-ust/lttng-probes.c +++ b/liblttng-ust/lttng-probes.c @@ -50,7 +50,7 @@ int check_event_provider(struct lttng_probe_desc *desc) 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, @@ -247,8 +247,8 @@ int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list) 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 { @@ -272,7 +272,7 @@ err_nomem: * 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; @@ -325,10 +325,10 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) 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 { @@ -348,41 +348,41 @@ int lttng_probes_get_field_list(struct lttng_ust_field_list *list) 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; @@ -410,7 +410,7 @@ err_nomem: * 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; diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 718dfbf7..1b21b80e 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -62,11 +62,11 @@ int lttng_abi_tracepoint_field_list(void *owner); * 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; @@ -76,21 +76,21 @@ struct lttng_ust_obj { } 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]; @@ -100,7 +100,7 @@ int objd_alloc(void *private_data, const struct lttng_ust_objd_ops *ops, 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; @@ -108,11 +108,11 @@ int objd_alloc(void *private_data, const struct lttng_ust_objd_ops *ops, 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; @@ -132,7 +132,7 @@ end: } 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; @@ -144,7 +144,7 @@ struct lttng_ust_obj *_objd_get(int id) 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; } @@ -152,14 +152,14 @@ void *objd_private(int id) 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; @@ -169,7 +169,7 @@ const struct lttng_ust_objd_ops *objd_ops(int id) 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; @@ -181,14 +181,14 @@ void objd_free(int id) 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; @@ -204,7 +204,7 @@ int lttng_ust_objd_unref(int id, int is_owner) 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); @@ -219,14 +219,14 @@ void objd_table_destroy(void) 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; @@ -237,19 +237,19 @@ void objd_table_destroy(void) 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) @@ -259,7 +259,7 @@ void lttng_ust_objd_table_owner_cleanup(void *owner) 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); } } @@ -268,14 +268,14 @@ void lttng_ust_objd_table_owner_cleanup(void *owner) * 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) { @@ -323,7 +323,7 @@ objd_error: 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; @@ -377,8 +377,8 @@ fd_error: 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); @@ -394,37 +394,37 @@ long lttng_abi_add_context(int objd, * @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: @@ -432,14 +432,14 @@ long lttng_cmd(int objd, unsigned int cmd, unsigned long arg, } } -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); @@ -455,7 +455,7 @@ int lttng_abi_map_channel(int 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; @@ -463,7 +463,7 @@ int lttng_abi_map_channel(int session_objd, type = ust_chan->type; switch (type) { - case LTTNG_UST_CHAN_PER_CPU: + case LTTNG_UST_ABI_CHAN_PER_CPU: break; default: ret = -EINVAL; @@ -497,7 +497,7 @@ int lttng_abi_map_channel(int session_objd, /* 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) { @@ -584,37 +584,37 @@ invalid: * @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: @@ -643,13 +643,13 @@ int lttng_release_session(int objd) } } -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 = @@ -657,7 +657,7 @@ static int lttng_ust_event_notifier_enabler_create(int event_notifier_group_obj, 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) { @@ -682,7 +682,7 @@ event_notifier_error: { 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: @@ -691,24 +691,24 @@ 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; @@ -725,26 +725,26 @@ long lttng_event_notifier_enabler_cmd(int objd, unsigned int cmd, unsigned long * @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); @@ -768,20 +768,20 @@ int lttng_release_event_notifier_group_error_counter(int objd) 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 = @@ -794,17 +794,17 @@ int lttng_ust_event_notifier_group_create_error_counter(int 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: @@ -855,7 +855,7 @@ create_error: { int err; - err = lttng_ust_objd_unref(counter_objd, 1); + err = lttng_ust_abi_objd_unref(counter_objd, 1); assert(!err); } objd_error: @@ -864,13 +864,13 @@ 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, @@ -885,10 +885,10 @@ long lttng_event_notifier_group_cmd(int objd, unsigned int cmd, unsigned long ar 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); } @@ -903,11 +903,11 @@ int lttng_event_notifier_enabler_release(int objd) 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, }; @@ -925,22 +925,22 @@ int lttng_release_event_notifier_group(int objd) } } -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) @@ -984,7 +984,7 @@ alloc_error: { int err; - err = lttng_ust_objd_unref(list_objd, 1); + err = lttng_ust_abi_objd_unref(list_objd, 1); assert(!err); } objd_error: @@ -1005,21 +1005,21 @@ int lttng_release_tracepoint_list(int objd) } } -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) @@ -1064,7 +1064,7 @@ alloc_error: { int err; - err = lttng_ust_objd_unref(list_objd, 1); + err = lttng_ust_abi_objd_unref(list_objd, 1); assert(!err); } objd_error: @@ -1085,14 +1085,14 @@ int lttng_release_tracepoint_field_list(int objd) } } -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; @@ -1114,7 +1114,7 @@ error_add_stream: 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) { @@ -1122,7 +1122,7 @@ int lttng_abi_create_event_enabler(int channel_objd, 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) { @@ -1147,7 +1147,7 @@ event_error: { int err; - err = lttng_ust_objd_unref(event_objd, 1); + err = lttng_ust_abi_objd_unref(event_objd, 1); assert(!err); } objd_error: @@ -1164,27 +1164,27 @@ 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. */ @@ -1193,18 +1193,18 @@ long lttng_channel_cmd(int objd, unsigned int cmd, unsigned long arg, } 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)) { /* @@ -1218,15 +1218,15 @@ long lttng_channel_cmd(int objd, unsigned int cmd, unsigned long arg, 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; @@ -1239,11 +1239,11 @@ int lttng_channel_release(int objd) 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, }; @@ -1258,33 +1258,33 @@ static const struct lttng_ust_objd_ops lttng_channel_ops = { * @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; @@ -1294,7 +1294,7 @@ long lttng_event_enabler_cmd(int objd, unsigned int cmd, unsigned long arg, 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); @@ -1310,12 +1310,12 @@ int lttng_event_enabler_release(int objd) 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, }; diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 19ce0ceb..0797ef3c 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -301,51 +301,51 @@ struct sock_info local_apps = { 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; @@ -751,9 +751,9 @@ static inline 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(); @@ -766,24 +766,24 @@ int handle_bytecode_recv(struct sock_info *sock_info, { 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; @@ -846,7 +846,7 @@ int handle_bytecode_recv(struct sock_info *sock_info, } } - ops = objd_ops(lum->handle); + ops = lttng_ust_abi_objd_ops(lum->handle); if (!ops) { ret = -ENOENT; goto end; @@ -869,10 +869,10 @@ int handle_message(struct sock_info *sock_info, 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)); @@ -882,32 +882,32 @@ int handle_message(struct sock_info *sock_info, 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; @@ -920,21 +920,21 @@ int handle_message(struct sock_info *sock_info, 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) { @@ -964,7 +964,7 @@ int handle_message(struct sock_info *sock_info, 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; @@ -1012,7 +1012,7 @@ int handle_message(struct sock_info *sock_info, } break; } - case LTTNG_UST_CHANNEL: + case LTTNG_UST_ABI_CHANNEL: { void *chan_data; int wakeup_fd; @@ -1064,7 +1064,7 @@ int handle_message(struct sock_info *sock_info, free(args.channel.chan_data); break; } - case LTTNG_UST_STREAM: + case LTTNG_UST_ABI_STREAM: { int close_ret; @@ -1101,16 +1101,16 @@ int handle_message(struct sock_info *sock_info, } 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; @@ -1159,7 +1159,7 @@ int handle_message(struct sock_info *sock_info, ret = -ENOSYS; } break; - case LTTNG_UST_COUNTER: + case LTTNG_UST_ABI_COUNTER: { void *counter_data; @@ -1198,7 +1198,7 @@ int handle_message(struct sock_info *sock_info, 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, @@ -1225,7 +1225,7 @@ int handle_message(struct sock_info *sock_info, } break; } - case LTTNG_UST_COUNTER_CPU: + case LTTNG_UST_ABI_COUNTER_CPU: { /* Receive shm_fd */ ret = ustcomm_recv_counter_shm_from_sessiond(sock, @@ -1252,10 +1252,10 @@ int handle_message(struct sock_info *sock_info, } 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); @@ -1345,10 +1345,10 @@ int handle_message(struct sock_info *sock_info, } 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; } @@ -1381,7 +1381,7 @@ int handle_message(struct sock_info *sock_info, */ 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)); @@ -1408,7 +1408,7 @@ void cleanup_sock_info(struct sock_info *sock_info, int exiting) 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"); } @@ -2036,7 +2036,7 @@ end: 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 */ @@ -2260,7 +2260,7 @@ void lttng_ust_cleanup(int exiting) * 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(); diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index adb3f015..b966d76b 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -21,7 +21,7 @@ #include #include -#include /* for LTTNG_UST_SYM_NAME_LEN */ +#include /* for LTTNG_UST_ABI_SYM_NAME_LEN */ #include #include @@ -256,14 +256,14 @@ static struct tracepoint_entry *get_tracepoint(const char *name) 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; @@ -284,14 +284,14 @@ static struct tracepoint_entry *add_tracepoint(const char *name, 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 */ } @@ -339,7 +339,7 @@ static void remove_tracepoint(struct tracepoint_entry *e) 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. @@ -394,9 +394,9 @@ static void add_callsite(struct tracepoint_lib * lib, struct lttng_ust_tracepoin 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)]; @@ -451,16 +451,16 @@ static void tracepoint_sync_callsites(const char *name) 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) { diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 613dfabb..c434f94b 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -15,6 +15,41 @@ #include #include + +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, @@ -32,7 +67,7 @@ struct lttng_enabler { /* 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; }; @@ -81,13 +116,13 @@ struct lttng_ust_excluder_node { * 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; }; @@ -97,7 +132,7 @@ struct lttng_ust_tracepoint_list { }; struct tp_field_list_entry { - struct lttng_ust_field_iter field; + struct lttng_ust_abi_field_iter field; struct cds_list_head head; }; @@ -254,7 +289,7 @@ struct lttng_enabler *lttng_event_notifier_enabler_as_enabler( 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); /* @@ -293,7 +328,7 @@ int lttng_event_enabler_attach_filter_bytecode( */ 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 @@ -342,7 +377,7 @@ LTTNG_HIDDEN 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. @@ -457,10 +492,10 @@ LTTNG_HIDDEN 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 @@ -514,4 +549,18 @@ 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 */