"lttng-ust-wait-" \
lttng_ust_stringify(LTTNG_UST_ABI_MAJOR_VERSION)
-struct ustctl_consumer_channel_attr {
+struct lttng_ust_ctl_consumer_channel_attr {
enum lttng_ust_abi_chan_type type;
uint64_t subbuf_size; /* bytes */
uint64_t num_subbuf; /* power of 2 */
* >= 0: Success (LTTNG_UST_OK)
* < 0: error code.
*/
-int ustctl_register_done(int sock);
-int ustctl_create_session(int sock);
-int ustctl_create_event(int sock, struct lttng_ust_abi_event *ev,
+int lttng_ust_ctl_register_done(int sock);
+int lttng_ust_ctl_create_session(int sock);
+int lttng_ust_ctl_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,
+int lttng_ust_ctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
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,
+int lttng_ust_ctl_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,
+int lttng_ust_ctl_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,
+int lttng_ust_ctl_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);
+int lttng_ust_ctl_enable(int sock, struct lttng_ust_abi_object_data *object);
+int lttng_ust_ctl_disable(int sock, struct lttng_ust_abi_object_data *object);
+int lttng_ust_ctl_start_session(int sock, int handle);
+int lttng_ust_ctl_stop_session(int sock, int handle);
/*
- * ustctl_create_event notifier_group creates a event notifier group. It
+ * lttng_ust_ctl_create_event notifier_group creates a event notifier group. It
* establishes the connection with the application by providing a file
* descriptor of the pipe to be used by the application when a event notifier
* of that group is fired. It returns a handle to be used when creating event
* notifier in that group.
*/
-int ustctl_create_event_notifier_group(int sock, int pipe_fd,
+int lttng_ust_ctl_create_event_notifier_group(int sock, int pipe_fd,
struct lttng_ust_abi_object_data **event_notifier_group);
/*
- * ustctl_create_event notifier creates a event notifier in a event notifier
+ * lttng_ust_ctl_create_event notifier creates a event notifier in a event notifier
* group giving a event notifier description and a event notifier group handle.
* It returns a event notifier handle to be used when enabling the event
* notifier, attaching filter, attaching exclusion, and disabling the event
* notifier.
*/
-int ustctl_create_event_notifier(int sock,
+int lttng_ust_ctl_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);
/*
- * ustctl_tracepoint_list returns a tracepoint list handle, or negative
+ * lttng_ust_ctl_tracepoint_list returns a tracepoint list handle, or negative
* error value.
*/
-int ustctl_tracepoint_list(int sock);
+int lttng_ust_ctl_tracepoint_list(int sock);
/*
- * ustctl_tracepoint_list_get is used to iterate on the tp list
+ * lttng_ust_ctl_tracepoint_list_get is used to iterate on the tp list
* handle. End is iteration is reached when -LTTNG_UST_ERR_NOENT is
* returned.
*/
-int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
+int lttng_ust_ctl_tracepoint_list_get(int sock, int tp_list_handle,
struct lttng_ust_abi_tracepoint_iter *iter);
/*
- * ustctl_tracepoint_field_list returns a tracepoint field list handle,
+ * lttng_ust_ctl_tracepoint_field_list returns a tracepoint field list handle,
* or negative error value.
*/
-int ustctl_tracepoint_field_list(int sock);
+int lttng_ust_ctl_tracepoint_field_list(int sock);
/*
- * ustctl_tracepoint_field_list_get is used to iterate on the tp field
+ * lttng_ust_ctl_tracepoint_field_list_get is used to iterate on the tp field
* list handle. End is iteration is reached when -LTTNG_UST_ERR_NOENT is
* returned.
*/
-int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
+int lttng_ust_ctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
struct lttng_ust_abi_field_iter *iter);
-int ustctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v);
-int ustctl_wait_quiescent(int sock);
+int lttng_ust_ctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v);
+int lttng_ust_ctl_wait_quiescent(int sock);
-int ustctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object);
+int lttng_ust_ctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object);
-int ustctl_calibrate(int sock, struct lttng_ust_abi_calibrate *calibrate);
+int lttng_ust_ctl_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_abi_object_data *data);
+int lttng_ust_ctl_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 lttng_ust_ctl_release_handle(int sock, int handle);
-int ustctl_recv_channel_from_consumer(int sock,
+int lttng_ust_ctl_recv_channel_from_consumer(int sock,
struct lttng_ust_abi_object_data **channel_data);
-int ustctl_recv_stream_from_consumer(int sock,
+int lttng_ust_ctl_recv_stream_from_consumer(int sock,
struct lttng_ust_abi_object_data **stream_data);
-int ustctl_send_channel_to_ust(int sock, int session_handle,
+int lttng_ust_ctl_send_channel_to_ust(int sock, int session_handle,
struct lttng_ust_abi_object_data *channel_data);
-int ustctl_send_stream_to_ust(int sock,
+int lttng_ust_ctl_send_stream_to_ust(int sock,
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
+ * lttng_ust_ctl_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().
+ * lttng_ust_ctl_release_object() and then freed with free().
*/
-int ustctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
+int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
struct lttng_ust_abi_object_data *src);
/*
* API used by consumer.
*/
-struct ustctl_consumer_channel;
-struct ustctl_consumer_stream;
-struct ustctl_consumer_channel_attr;
+struct lttng_ust_ctl_consumer_channel;
+struct lttng_ust_ctl_consumer_stream;
+struct lttng_ust_ctl_consumer_channel_attr;
-int ustctl_get_nr_stream_per_channel(void);
+int lttng_ust_ctl_get_nr_stream_per_channel(void);
-struct ustctl_consumer_channel *
- ustctl_create_channel(struct ustctl_consumer_channel_attr *attr,
+struct lttng_ust_ctl_consumer_channel *
+ lttng_ust_ctl_create_channel(struct lttng_ust_ctl_consumer_channel_attr *attr,
const int *stream_fds, int nr_stream_fds);
/*
* Each stream created needs to be destroyed before calling
- * ustctl_destroy_channel().
+ * lttng_ust_ctl_destroy_channel().
*/
-void ustctl_destroy_channel(struct ustctl_consumer_channel *chan);
+void lttng_ust_ctl_destroy_channel(struct lttng_ust_ctl_consumer_channel *chan);
-int ustctl_send_channel_to_sessiond(int sock,
- struct ustctl_consumer_channel *channel);
-int ustctl_channel_close_wait_fd(struct ustctl_consumer_channel *consumer_chan);
-int ustctl_channel_close_wakeup_fd(struct ustctl_consumer_channel *consumer_chan);
-int ustctl_channel_get_wait_fd(struct ustctl_consumer_channel *consumer_chan);
-int ustctl_channel_get_wakeup_fd(struct ustctl_consumer_channel *consumer_chan);
+int lttng_ust_ctl_send_channel_to_sessiond(int sock,
+ struct lttng_ust_ctl_consumer_channel *channel);
+int lttng_ust_ctl_channel_close_wait_fd(struct lttng_ust_ctl_consumer_channel *consumer_chan);
+int lttng_ust_ctl_channel_close_wakeup_fd(struct lttng_ust_ctl_consumer_channel *consumer_chan);
+int lttng_ust_ctl_channel_get_wait_fd(struct lttng_ust_ctl_consumer_channel *consumer_chan);
+int lttng_ust_ctl_channel_get_wakeup_fd(struct lttng_ust_ctl_consumer_channel *consumer_chan);
-int ustctl_write_metadata_to_channel(
- struct ustctl_consumer_channel *channel,
+int lttng_ust_ctl_write_metadata_to_channel(
+ struct lttng_ust_ctl_consumer_channel *channel,
const char *metadata_str, /* NOT null-terminated */
size_t len); /* metadata length */
-ssize_t ustctl_write_one_packet_to_channel(
- struct ustctl_consumer_channel *channel,
+ssize_t lttng_ust_ctl_write_one_packet_to_channel(
+ struct lttng_ust_ctl_consumer_channel *channel,
const char *metadata_str, /* NOT null-terminated */
size_t len); /* metadata length */
* Send a NULL stream to finish iteration over all streams of a given
* channel.
*/
-int ustctl_send_stream_to_sessiond(int sock,
- struct ustctl_consumer_stream *stream);
-int ustctl_stream_close_wait_fd(struct ustctl_consumer_stream *stream);
-int ustctl_stream_close_wakeup_fd(struct ustctl_consumer_stream *stream);
-int ustctl_stream_get_wait_fd(struct ustctl_consumer_stream *stream);
-int ustctl_stream_get_wakeup_fd(struct ustctl_consumer_stream *stream);
+int lttng_ust_ctl_send_stream_to_sessiond(int sock,
+ struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_stream_close_wait_fd(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_stream_close_wakeup_fd(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_stream_get_wait_fd(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_stream_get_wakeup_fd(struct lttng_ust_ctl_consumer_stream *stream);
/* Create/destroy stream buffers for read */
-struct ustctl_consumer_stream *
- ustctl_create_stream(struct ustctl_consumer_channel *channel,
+struct lttng_ust_ctl_consumer_stream *
+ lttng_ust_ctl_create_stream(struct lttng_ust_ctl_consumer_channel *channel,
int cpu);
-void ustctl_destroy_stream(struct ustctl_consumer_stream *stream);
+void lttng_ust_ctl_destroy_stream(struct lttng_ust_ctl_consumer_stream *stream);
/* For mmap mode, readable without "get" operation */
-int ustctl_get_mmap_len(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_mmap_len(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len);
-int ustctl_get_max_subbuf_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_max_subbuf_size(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len);
/*
* For mmap mode, operate on the current packet (between get/put or
* get_next/put_next).
*/
-void *ustctl_get_mmap_base(struct ustctl_consumer_stream *stream);
-int ustctl_get_mmap_read_offset(struct ustctl_consumer_stream *stream,
+void *lttng_ust_ctl_get_mmap_base(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_get_mmap_read_offset(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *off);
-int ustctl_get_subbuf_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_subbuf_size(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len);
-int ustctl_get_padded_subbuf_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_padded_subbuf_size(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len);
-int ustctl_get_next_subbuf(struct ustctl_consumer_stream *stream);
-int ustctl_put_next_subbuf(struct ustctl_consumer_stream *stream);
+int lttng_ust_ctl_get_next_subbuf(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_put_next_subbuf(struct lttng_ust_ctl_consumer_stream *stream);
/* snapshot */
-int ustctl_snapshot(struct ustctl_consumer_stream *stream);
-int ustctl_snapshot_sample_positions(struct ustctl_consumer_stream *stream);
-int ustctl_snapshot_get_consumed(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_snapshot(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_snapshot_sample_positions(struct lttng_ust_ctl_consumer_stream *stream);
+int lttng_ust_ctl_snapshot_get_consumed(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *pos);
-int ustctl_snapshot_get_produced(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_snapshot_get_produced(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *pos);
-int ustctl_get_subbuf(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_subbuf(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *pos);
-int ustctl_put_subbuf(struct ustctl_consumer_stream *stream);
+int lttng_ust_ctl_put_subbuf(struct lttng_ust_ctl_consumer_stream *stream);
-void ustctl_flush_buffer(struct ustctl_consumer_stream *stream,
+void lttng_ust_ctl_flush_buffer(struct lttng_ust_ctl_consumer_stream *stream,
int producer_active);
-void ustctl_clear_buffer(struct ustctl_consumer_stream *stream);
+void lttng_ust_ctl_clear_buffer(struct lttng_ust_ctl_consumer_stream *stream);
/* index */
* or get_next/put_next.
*/
-int ustctl_get_timestamp_begin(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_timestamp_begin(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *timestamp_begin);
-int ustctl_get_timestamp_end(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_timestamp_end(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *timestamp_end);
-int ustctl_get_events_discarded(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_events_discarded(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *events_discarded);
-int ustctl_get_content_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_content_size(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *content_size);
-int ustctl_get_packet_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_packet_size(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *packet_size);
-int ustctl_get_sequence_number(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_sequence_number(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *seq);
/*
* without "get" operation.
*/
-int ustctl_get_stream_id(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_stream_id(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *stream_id);
-int ustctl_get_instance_id(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_instance_id(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *id);
/*
* Getter returning the current timestamp as perceived from the
* tracer.
*/
-int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_current_timestamp(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *ts);
/* returns whether UST has perf counters support. */
-int ustctl_has_perf_counters(void);
+int lttng_ust_ctl_has_perf_counters(void);
/* Regenerate the statedump. */
-int ustctl_regenerate_statedump(int sock, int handle);
+int lttng_ust_ctl_regenerate_statedump(int sock, int handle);
/* event registry management */
-enum ustctl_socket_type {
- USTCTL_SOCKET_CMD = 0,
- USTCTL_SOCKET_NOTIFY = 1,
+enum lttng_ust_ctl_socket_type {
+ LTTNG_UST_CTL_SOCKET_CMD = 0,
+ LTTNG_UST_CTL_SOCKET_NOTIFY = 1,
};
-enum ustctl_notify_cmd {
- USTCTL_NOTIFY_CMD_EVENT = 0,
- USTCTL_NOTIFY_CMD_CHANNEL = 1,
- USTCTL_NOTIFY_CMD_ENUM = 2,
+enum lttng_ust_ctl_notify_cmd {
+ LTTNG_UST_CTL_NOTIFY_CMD_EVENT = 0,
+ LTTNG_UST_CTL_NOTIFY_CMD_CHANNEL = 1,
+ LTTNG_UST_CTL_NOTIFY_CMD_ENUM = 2,
};
-enum ustctl_channel_header {
- USTCTL_CHANNEL_HEADER_UNKNOWN = 0,
- USTCTL_CHANNEL_HEADER_COMPACT = 1,
- USTCTL_CHANNEL_HEADER_LARGE = 2,
+enum lttng_ust_ctl_channel_header {
+ LTTNG_UST_CTL_CHANNEL_HEADER_UNKNOWN = 0,
+ LTTNG_UST_CTL_CHANNEL_HEADER_COMPACT = 1,
+ LTTNG_UST_CTL_CHANNEL_HEADER_LARGE = 2,
};
/* event type structures */
-enum ustctl_abstract_types {
- ustctl_atype_integer,
- ustctl_atype_enum, /* legacy */
- ustctl_atype_array, /* legacy */
- ustctl_atype_sequence, /* legacy */
- ustctl_atype_string,
- ustctl_atype_float,
- ustctl_atype_variant, /* legacy */
- ustctl_atype_struct, /* legacy */
- ustctl_atype_enum_nestable,
- ustctl_atype_array_nestable,
- ustctl_atype_sequence_nestable,
- ustctl_atype_struct_nestable,
- ustctl_atype_variant_nestable,
- NR_USTCTL_ABSTRACT_TYPES,
+enum lttng_ust_ctl_abstract_types {
+ lttng_ust_ctl_atype_integer,
+ lttng_ust_ctl_atype_enum, /* legacy */
+ lttng_ust_ctl_atype_array, /* legacy */
+ lttng_ust_ctl_atype_sequence, /* legacy */
+ lttng_ust_ctl_atype_string,
+ lttng_ust_ctl_atype_float,
+ lttng_ust_ctl_atype_variant, /* legacy */
+ lttng_ust_ctl_atype_struct, /* legacy */
+ lttng_ust_ctl_atype_enum_nestable,
+ lttng_ust_ctl_atype_array_nestable,
+ lttng_ust_ctl_atype_sequence_nestable,
+ lttng_ust_ctl_atype_struct_nestable,
+ lttng_ust_ctl_atype_variant_nestable,
+ NR_LTTNG_UST_CTL_ABSTRACT_TYPES,
};
-enum ustctl_string_encodings {
- ustctl_encode_none = 0,
- ustctl_encode_UTF8 = 1,
- ustctl_encode_ASCII = 2,
- NR_USTCTL_STRING_ENCODINGS,
+enum lttng_ust_ctl_string_encodings {
+ lttng_ust_ctl_encode_none = 0,
+ lttng_ust_ctl_encode_UTF8 = 1,
+ lttng_ust_ctl_encode_ASCII = 2,
+ NR_LTTNG_UST_CTL_STRING_ENCODINGS,
};
-#define USTCTL_UST_INTEGER_TYPE_PADDING 24
-struct ustctl_integer_type {
+#define LTTNG_UST_CTL_UST_INTEGER_TYPE_PADDING 24
+struct lttng_ust_ctl_integer_type {
uint32_t size; /* in bits */
uint32_t signedness;
uint32_t reverse_byte_order;
uint32_t base; /* 2, 8, 10, 16, for pretty print */
- int32_t encoding; /* enum ustctl_string_encodings */
+ int32_t encoding; /* enum lttng_ust_ctl_string_encodings */
uint16_t alignment; /* in bits */
- char padding[USTCTL_UST_INTEGER_TYPE_PADDING];
+ char padding[LTTNG_UST_CTL_UST_INTEGER_TYPE_PADDING];
} __attribute__((packed));
-#define USTCTL_UST_FLOAT_TYPE_PADDING 24
-struct ustctl_float_type {
+#define LTTNG_UST_CTL_UST_FLOAT_TYPE_PADDING 24
+struct lttng_ust_ctl_float_type {
uint32_t exp_dig; /* exponent digits, in bits */
uint32_t mant_dig; /* mantissa digits, in bits */
uint32_t reverse_byte_order;
uint16_t alignment; /* in bits */
- char padding[USTCTL_UST_FLOAT_TYPE_PADDING];
+ char padding[LTTNG_UST_CTL_UST_FLOAT_TYPE_PADDING];
} __attribute__((packed));
-#define USTCTL_UST_ENUM_VALUE_PADDING 15
-struct ustctl_enum_value {
+#define LTTNG_UST_CTL_UST_ENUM_VALUE_PADDING 15
+struct lttng_ust_ctl_enum_value {
uint64_t value;
uint8_t signedness;
- char padding[USTCTL_UST_ENUM_VALUE_PADDING];
+ char padding[LTTNG_UST_CTL_UST_ENUM_VALUE_PADDING];
} __attribute__((packed));
-enum ustctl_ust_enum_entry_options {
- USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0,
+enum lttng_ust_ctl_ust_enum_entry_options {
+ LTTNG_UST_CTL_UST_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0,
};
-#define USTCTL_UST_ENUM_ENTRY_PADDING 32
-struct ustctl_enum_entry {
- struct ustctl_enum_value start, end; /* start and end are inclusive */
+#define LTTNG_UST_CTL_UST_ENUM_ENTRY_PADDING 32
+struct lttng_ust_ctl_enum_entry {
+ struct lttng_ust_ctl_enum_value start, end; /* start and end are inclusive */
char string[LTTNG_UST_ABI_SYM_NAME_LEN];
union {
struct {
uint32_t options;
} __attribute__((packed)) extra;
- char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
+ char padding[LTTNG_UST_CTL_UST_ENUM_ENTRY_PADDING];
} u;
} __attribute__((packed));
/* legacy */
-#define USTCTL_UST_BASIC_TYPE_PADDING 296
-union _ustctl_basic_type {
- struct ustctl_integer_type integer;
+#define LTTNG_UST_CTL_UST_BASIC_TYPE_PADDING 296
+union _lttng_ust_ctl_basic_type {
+ struct lttng_ust_ctl_integer_type integer;
struct {
char name[LTTNG_UST_ABI_SYM_NAME_LEN];
- struct ustctl_integer_type container_type;
+ struct lttng_ust_ctl_integer_type container_type;
uint64_t id; /* enum ID in sessiond. */
} enumeration;
struct {
- int32_t encoding; /* enum ustctl_string_encodings */
+ int32_t encoding; /* enum lttng_ust_ctl_string_encodings */
} string;
- struct ustctl_float_type _float;
- char padding[USTCTL_UST_BASIC_TYPE_PADDING];
+ struct lttng_ust_ctl_float_type _float;
+ char padding[LTTNG_UST_CTL_UST_BASIC_TYPE_PADDING];
} __attribute__((packed));
/* legacy */
-struct ustctl_basic_type {
- enum ustctl_abstract_types atype;
+struct lttng_ust_ctl_basic_type {
+ enum lttng_ust_ctl_abstract_types atype;
union {
- union _ustctl_basic_type basic;
+ union _lttng_ust_ctl_basic_type basic;
} u;
} __attribute__((packed));
/*
* Padding is derived from largest member: u.legacy.sequence which
- * contains two basic types, each with USTCTL_UST_BASIC_TYPE_PADDING.
+ * contains two basic types, each with LTTNG_UST_CTL_UST_BASIC_TYPE_PADDING.
*/
-#define USTCTL_UST_TYPE_PADDING (2 * USTCTL_UST_BASIC_TYPE_PADDING)
-struct ustctl_type {
- enum ustctl_abstract_types atype;
+#define LTTNG_UST_CTL_UST_TYPE_PADDING (2 * LTTNG_UST_CTL_UST_BASIC_TYPE_PADDING)
+struct lttng_ust_ctl_type {
+ enum lttng_ust_ctl_abstract_types atype;
union {
- struct ustctl_integer_type integer;
- struct ustctl_float_type _float;
+ struct lttng_ust_ctl_integer_type integer;
+ struct lttng_ust_ctl_float_type _float;
struct {
- int32_t encoding; /* enum ustctl_string_encodings */
+ int32_t encoding; /* enum lttng_ust_ctl_string_encodings */
} string;
struct {
char name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint64_t id; /* enum ID in sessiond. */
- /* container_type follows after this struct ustctl_field. */
+ /* container_type follows after this struct lttng_ust_ctl_field. */
} enum_nestable;
struct {
uint32_t length; /* num. elems. */
uint32_t alignment;
- /* elem_type follows after this struct ustctl_field. */
+ /* elem_type follows after this struct lttng_ust_ctl_field. */
} array_nestable;
struct {
char length_name[LTTNG_UST_ABI_SYM_NAME_LEN];
struct {
uint32_t nr_fields;
uint32_t alignment;
- /* Followed by nr_fields struct ustctl_field. */
+ /* Followed by nr_fields struct lttng_ust_ctl_field. */
} struct_nestable;
struct {
uint32_t nr_choices;
char tag_name[LTTNG_UST_ABI_SYM_NAME_LEN];
uint32_t alignment;
- /* Followed by nr_choices struct ustctl_field. */
+ /* Followed by nr_choices struct lttng_ust_ctl_field. */
} variant_nestable;
/* Legacy ABI */
union {
- union _ustctl_basic_type basic;
+ union _lttng_ust_ctl_basic_type basic;
struct {
- struct ustctl_basic_type elem_type;
+ struct lttng_ust_ctl_basic_type elem_type;
uint32_t length; /* num. elems. */
} array;
struct {
- struct ustctl_basic_type length_type;
- struct ustctl_basic_type elem_type;
+ struct lttng_ust_ctl_basic_type length_type;
+ struct lttng_ust_ctl_basic_type elem_type;
} sequence;
struct {
uint32_t nr_fields;
- /* Followed by nr_fields struct ustctl_field. */
+ /* Followed by nr_fields struct lttng_ust_ctl_field. */
} _struct;
struct {
uint32_t nr_choices;
char tag_name[LTTNG_UST_ABI_SYM_NAME_LEN];
- /* Followed by nr_choices struct ustctl_field. */
+ /* Followed by nr_choices struct lttng_ust_ctl_field. */
} variant;
} legacy;
- char padding[USTCTL_UST_TYPE_PADDING];
+ char padding[LTTNG_UST_CTL_UST_TYPE_PADDING];
} u;
} __attribute__((packed));
-#define USTCTL_UST_FIELD_PADDING 28
-struct ustctl_field {
+#define LTTNG_UST_CTL_UST_FIELD_PADDING 28
+struct lttng_ust_ctl_field {
char name[LTTNG_UST_ABI_SYM_NAME_LEN];
- struct ustctl_type type;
- char padding[USTCTL_UST_FIELD_PADDING];
+ struct lttng_ust_ctl_type type;
+ char padding[LTTNG_UST_CTL_UST_FIELD_PADDING];
} __attribute__((packed));
/*
* If an error other than -LTTNG_UST_ERR_UNSUP_MAJOR is returned,
* the output fields are not populated.
*/
-int ustctl_recv_reg_msg(int sock,
- enum ustctl_socket_type *type,
+int lttng_ust_ctl_recv_reg_msg(int sock,
+ enum lttng_ust_ctl_socket_type *type,
uint32_t *major,
uint32_t *minor,
uint32_t *pid,
/*
* Returns 0 on success, negative UST or system error value on error.
* Receive the notification command. The "notify_cmd" can then be used
- * by the caller to find out which ustctl_recv_* function should be
- * called to receive the notification, and which ustctl_reply_* is
+ * by the caller to find out which lttng_ust_ctl_recv_* function should be
+ * called to receive the notification, and which lttng_ust_ctl_reply_* is
* appropriate.
*/
-int ustctl_recv_notify(int sock, enum ustctl_notify_cmd *notify_cmd);
+int lttng_ust_ctl_recv_notify(int sock, enum lttng_ust_ctl_notify_cmd *notify_cmd);
/*
* Returns 0 on success, negative UST or system error value on error.
*/
-int ustctl_recv_register_event(int sock,
+int lttng_ust_ctl_recv_register_event(int sock,
int *session_objd, /* session descriptor (output) */
int *channel_objd, /* channel descriptor (output) */
char *event_name, /*
* returns success.)
*/
size_t *nr_fields,
- struct ustctl_field **fields,
+ struct lttng_ust_ctl_field **fields,
char **model_emf_uri);
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_reply_register_event(int sock,
+int lttng_ust_ctl_reply_register_event(int sock,
uint32_t id, /* event id (input) */
int ret_code); /* return code. 0 ok, negative error */
/*
* Returns 0 on success, negative UST or system error value on error.
*/
-int ustctl_recv_register_enum(int sock,
+int lttng_ust_ctl_recv_register_enum(int sock,
int *session_objd,
char *enum_name,
- struct ustctl_enum_entry **entries,
+ struct lttng_ust_ctl_enum_entry **entries,
size_t *nr_entries);
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_reply_register_enum(int sock,
+int lttng_ust_ctl_reply_register_enum(int sock,
uint64_t id, /* enum id (input) */
int ret_code);
/*
* Returns 0 on success, negative UST or system error value on error.
*/
-int ustctl_recv_register_channel(int sock,
+int lttng_ust_ctl_recv_register_channel(int sock,
int *session_objd, /* session descriptor (output) */
int *channel_objd, /* channel descriptor (output) */
size_t *nr_fields, /* context fields */
- struct ustctl_field **fields);
+ struct lttng_ust_ctl_field **fields);
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_reply_register_channel(int sock,
+int lttng_ust_ctl_reply_register_channel(int sock,
uint32_t chan_id,
- enum ustctl_channel_header header_type,
+ enum lttng_ust_ctl_channel_header header_type,
int ret_code); /* return code. 0 ok, negative error */
/*
* Counter API.
*/
-enum ustctl_counter_bitness {
- USTCTL_COUNTER_BITNESS_32 = 0,
- USTCTL_COUNTER_BITNESS_64 = 1,
+enum lttng_ust_ctl_counter_bitness {
+ LTTNG_UST_CTL_COUNTER_BITNESS_32 = 0,
+ LTTNG_UST_CTL_COUNTER_BITNESS_64 = 1,
};
-enum ustctl_counter_arithmetic {
- USTCTL_COUNTER_ARITHMETIC_MODULAR = 0,
- USTCTL_COUNTER_ARITHMETIC_SATURATION = 1,
+enum lttng_ust_ctl_counter_arithmetic {
+ LTTNG_UST_CTL_COUNTER_ARITHMETIC_MODULAR = 0,
+ LTTNG_UST_CTL_COUNTER_ARITHMETIC_SATURATION = 1,
};
/* Used as alloc flags. */
-enum ustctl_counter_alloc {
- USTCTL_COUNTER_ALLOC_PER_CPU = (1 << 0),
- USTCTL_COUNTER_ALLOC_GLOBAL = (1 << 1),
+enum lttng_ust_ctl_counter_alloc {
+ LTTNG_UST_CTL_COUNTER_ALLOC_PER_CPU = (1 << 0),
+ LTTNG_UST_CTL_COUNTER_ALLOC_GLOBAL = (1 << 1),
};
-struct ustctl_daemon_counter;
+struct lttng_ust_ctl_daemon_counter;
-int ustctl_get_nr_cpu_per_counter(void);
+int lttng_ust_ctl_get_nr_cpu_per_counter(void);
-struct ustctl_counter_dimension {
+struct lttng_ust_ctl_counter_dimension {
uint64_t size;
uint64_t underflow_index;
uint64_t overflow_index;
uint8_t has_overflow;
};
-struct ustctl_daemon_counter *
- ustctl_create_counter(size_t nr_dimensions,
- const struct ustctl_counter_dimension *dimensions,
+struct lttng_ust_ctl_daemon_counter *
+ lttng_ust_ctl_create_counter(size_t nr_dimensions,
+ const struct lttng_ust_ctl_counter_dimension *dimensions,
int64_t global_sum_step,
int global_counter_fd,
int nr_counter_cpu_fds,
const int *counter_cpu_fds,
- enum ustctl_counter_bitness bitness,
- enum ustctl_counter_arithmetic arithmetic,
+ enum lttng_ust_ctl_counter_bitness bitness,
+ enum lttng_ust_ctl_counter_arithmetic arithmetic,
uint32_t alloc_flags,
bool coalesce_hits);
-int ustctl_create_counter_data(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_create_counter_data(struct lttng_ust_ctl_daemon_counter *counter,
struct lttng_ust_abi_object_data **counter_data);
-int ustctl_create_counter_global_data(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_create_counter_global_data(struct lttng_ust_ctl_daemon_counter *counter,
struct lttng_ust_abi_object_data **counter_global_data);
-int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cpu,
+int lttng_ust_ctl_create_counter_cpu_data(struct lttng_ust_ctl_daemon_counter *counter, int cpu,
struct lttng_ust_abi_object_data **counter_cpu_data);
/*
* Each counter data and counter cpu data created need to be destroyed
- * before calling ustctl_destroy_counter().
+ * before calling lttng_ust_ctl_destroy_counter().
*/
-void ustctl_destroy_counter(struct ustctl_daemon_counter *counter);
+void lttng_ust_ctl_destroy_counter(struct lttng_ust_ctl_daemon_counter *counter);
-int ustctl_send_counter_data_to_ust(int sock, int parent_handle,
+int lttng_ust_ctl_send_counter_data_to_ust(int sock, int parent_handle,
struct lttng_ust_abi_object_data *counter_data);
-int ustctl_send_counter_global_data_to_ust(int sock,
+int lttng_ust_ctl_send_counter_global_data_to_ust(int sock,
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,
+int lttng_ust_ctl_send_counter_cpu_data_to_ust(int sock,
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,
+int lttng_ust_ctl_counter_read(struct lttng_ust_ctl_daemon_counter *counter,
const size_t *dimension_indexes,
int cpu, int64_t *value,
bool *overflow, bool *underflow);
-int ustctl_counter_aggregate(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_counter_aggregate(struct lttng_ust_ctl_daemon_counter *counter,
const size_t *dimension_indexes,
int64_t *value,
bool *overflow, bool *underflow);
-int ustctl_counter_clear(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_counter_clear(struct lttng_ust_ctl_daemon_counter *counter,
const size_t *dimension_indexes);
#endif /* _LTTNG_UST_CTL_H */
const struct lttng_ust_event_field * const *lttng_fields);
static
int serialize_one_field(struct lttng_ust_session *session,
- struct ustctl_field *fields, size_t *iter_output,
+ struct lttng_ust_ctl_field *fields, size_t *iter_output,
const struct lttng_ust_event_field *lf);
static
int serialize_fields(struct lttng_ust_session *session,
- struct ustctl_field *ustctl_fields,
+ struct lttng_ust_ctl_field *lttng_ust_ctl_fields,
size_t *iter_output, size_t nr_lttng_fields,
const struct lttng_ust_event_field * const *lttng_fields);
* Returns 0 on success, negative error value on error.
*/
int ustcomm_send_reg_msg(int sock,
- enum ustctl_socket_type type,
+ enum lttng_ust_ctl_socket_type type,
uint32_t bits_per_long,
uint32_t uint8_t_alignment,
uint32_t uint16_t_alignment,
uint32_t long_alignment)
{
ssize_t len;
- struct ustctl_reg_msg reg_msg;
+ struct lttng_ust_ctl_reg_msg reg_msg;
reg_msg.magic = LTTNG_UST_ABI_COMM_MAGIC;
reg_msg.major = LTTNG_UST_ABI_MAJOR_VERSION;
{
switch (le) {
case lttng_ust_string_encoding_none:
- *ue = ustctl_encode_none;
+ *ue = lttng_ust_ctl_encode_none;
break;
case lttng_ust_string_encoding_UTF8:
- *ue = ustctl_encode_UTF8;
+ *ue = lttng_ust_ctl_encode_UTF8;
break;
case lttng_ust_string_encoding_ASCII:
- *ue = ustctl_encode_ASCII;
+ *ue = lttng_ust_ctl_encode_ASCII;
break;
default:
return -EINVAL;
}
static
-int serialize_integer_type(struct ustctl_integer_type *uit,
+int serialize_integer_type(struct lttng_ust_ctl_integer_type *uit,
const struct lttng_ust_type_integer *lit,
enum lttng_ust_string_encoding lencoding)
{
static
int serialize_dynamic_type(struct lttng_ust_session *session,
- struct ustctl_field *fields, size_t *iter_output,
+ struct lttng_ust_ctl_field *fields, size_t *iter_output,
const char *field_name)
{
const struct lttng_ust_event_field * const *choices;
.name = tag_field_name,
.nowrite = 0,
};
- struct ustctl_field *uf;
+ struct lttng_ust_ctl_field *uf;
size_t nr_choices, i;
int ret;
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.atype = lttng_ust_ctl_atype_variant;
uf->type.u.variant_nestable.nr_choices = nr_choices;
strncpy(uf->type.u.variant_nestable.tag_name,
tag_field_name,
static
int serialize_one_type(struct lttng_ust_session *session,
- struct ustctl_field *fields, size_t *iter_output,
+ struct lttng_ust_ctl_field *fields, size_t *iter_output,
const char *field_name, const struct lttng_ust_type_common *lt,
enum lttng_ust_string_encoding parent_encoding)
{
int ret;
/*
- * Serializing a type (rather than a field) generates a ustctl_field
+ * Serializing a type (rather than a field) generates a lttng_ust_ctl_field
* entry with 0-length name.
*/
switch (lt->type) {
case lttng_ust_type_integer:
{
- struct ustctl_field *uf = &fields[*iter_output];
- struct ustctl_type *ut = &uf->type;
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_type *ut = &uf->type;
if (field_name) {
strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
parent_encoding);
if (ret)
return ret;
- ut->atype = ustctl_atype_integer;
+ ut->atype = lttng_ust_ctl_atype_integer;
(*iter_output)++;
break;
}
case lttng_ust_type_float:
{
- struct ustctl_field *uf = &fields[*iter_output];
- struct ustctl_type *ut = &uf->type;
- struct ustctl_float_type *uft;
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_type *ut = &uf->type;
+ struct lttng_ust_ctl_float_type *uft;
const struct lttng_ust_type_float *lft;
if (field_name) {
uft->mant_dig = lft->mant_dig;
uft->alignment = lft->alignment;
uft->reverse_byte_order = lft->reverse_byte_order;
- ut->atype = ustctl_atype_float;
+ ut->atype = lttng_ust_ctl_atype_float;
(*iter_output)++;
break;
}
case lttng_ust_type_string:
{
- struct ustctl_field *uf = &fields[*iter_output];
- struct ustctl_type *ut = &uf->type;
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_type *ut = &uf->type;
int32_t encoding;
if (field_name) {
if (ret)
return ret;
ut->u.string.encoding = encoding;
- ut->atype = ustctl_atype_string;
+ ut->atype = lttng_ust_ctl_atype_string;
(*iter_output)++;
break;
}
case lttng_ust_type_array:
{
- struct ustctl_field *uf = &fields[*iter_output];
- struct ustctl_type *ut = &uf->type;
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_type *ut = &uf->type;
if (field_name) {
strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
} else {
uf->name[0] = '\0';
}
- ut->atype = ustctl_atype_array_nestable;
+ ut->atype = lttng_ust_ctl_atype_array_nestable;
ut->u.array_nestable.length = lttng_ust_get_type_array(lt)->length;
ut->u.array_nestable.alignment = lttng_ust_get_type_array(lt)->alignment;
(*iter_output)++;
}
case lttng_ust_type_sequence:
{
- struct ustctl_field *uf = &fields[*iter_output];
- struct ustctl_type *ut = &uf->type;
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_type *ut = &uf->type;
if (field_name) {
strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
} else {
uf->name[0] = '\0';
}
- ut->atype = ustctl_atype_sequence_nestable;
+ ut->atype = lttng_ust_ctl_atype_sequence_nestable;
strncpy(ut->u.sequence_nestable.length_name,
lttng_ust_get_type_sequence(lt)->length_name,
LTTNG_UST_ABI_SYM_NAME_LEN);
}
case lttng_ust_type_struct:
{
- struct ustctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
if (field_name) {
strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
} else {
uf->name[0] = '\0';
}
- uf->type.atype = ustctl_atype_struct_nestable;
+ uf->type.atype = lttng_ust_ctl_atype_struct_nestable;
uf->type.u.struct_nestable.nr_fields = lttng_ust_get_type_struct(lt)->nr_fields;
uf->type.u.struct_nestable.alignment = lttng_ust_get_type_struct(lt)->alignment;
(*iter_output)++;
}
case lttng_ust_type_enum:
{
- struct ustctl_field *uf = &fields[*iter_output];
- struct ustctl_type *ut = &uf->type;
+ struct lttng_ust_ctl_field *uf = &fields[*iter_output];
+ struct lttng_ust_ctl_type *ut = &uf->type;
if (field_name) {
strncpy(uf->name, field_name, LTTNG_UST_ABI_SYM_NAME_LEN);
strncpy(ut->u.enum_nestable.name, lttng_ust_get_type_enum(lt)->desc->name,
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;
+ ut->atype = lttng_ust_ctl_atype_enum_nestable;
(*iter_output)++;
ret = serialize_one_type(session, fields, iter_output, NULL,
static
int serialize_one_field(struct lttng_ust_session *session,
- struct ustctl_field *fields, size_t *iter_output,
+ struct lttng_ust_ctl_field *fields, size_t *iter_output,
const struct lttng_ust_event_field *lf)
{
/* skip 'nowrite' fields */
static
int serialize_fields(struct lttng_ust_session *session,
- struct ustctl_field *ustctl_fields,
+ struct lttng_ust_ctl_field *lttng_ust_ctl_fields,
size_t *iter_output, size_t nr_lttng_fields,
const struct lttng_ust_event_field * const *lttng_fields)
{
size_t i;
for (i = 0; i < nr_lttng_fields; i++) {
- ret = serialize_one_field(session, ustctl_fields,
+ ret = serialize_one_field(session, lttng_ust_ctl_fields,
iter_output, lttng_fields[i]);
if (ret)
return ret;
static
int alloc_serialize_fields(struct lttng_ust_session *session,
size_t *_nr_write_fields,
- struct ustctl_field **ustctl_fields,
+ struct lttng_ust_ctl_field **lttng_ust_ctl_fields,
size_t nr_fields,
const struct lttng_ust_event_field * const *lttng_fields)
{
- struct ustctl_field *fields;
+ struct lttng_ust_ctl_field *fields;
int ret;
size_t iter_output = 0;
ssize_t nr_write_fields;
goto error_type;
*_nr_write_fields = nr_write_fields;
- *ustctl_fields = fields;
+ *lttng_ust_ctl_fields = fields;
return 0;
error_type:
}
static
-int serialize_entries(struct ustctl_enum_entry **_entries,
+int serialize_entries(struct lttng_ust_ctl_enum_entry **_entries,
size_t nr_entries,
const struct lttng_ust_enum_entry * const *lttng_entries)
{
- struct ustctl_enum_entry *entries;
+ struct lttng_ust_ctl_enum_entry *entries;
int i;
/* Serialize the entries */
if (!entries)
return -ENOMEM;
for (i = 0; i < nr_entries; i++) {
- struct ustctl_enum_entry *uentry;
+ struct lttng_ust_ctl_enum_entry *uentry;
const struct lttng_ust_enum_entry *lentry;
uentry = &entries[i];
if (lentry->options & LTTNG_UST_ENUM_ENTRY_OPTION_IS_AUTO) {
uentry->u.extra.options |=
- USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO;
+ LTTNG_UST_CTL_UST_ENUM_ENTRY_OPTION_IS_AUTO;
}
}
*_entries = entries;
static
int serialize_ctx_fields(struct lttng_ust_session *session,
size_t *_nr_write_fields,
- struct ustctl_field **ustctl_fields,
+ struct lttng_ust_ctl_field **lttng_ust_ctl_fields,
size_t nr_fields,
struct lttng_ust_ctx_field *lttng_fields)
{
- struct ustctl_field *fields;
+ struct lttng_ust_ctl_field *fields;
int ret;
size_t i, iter_output = 0;
ssize_t nr_write_fields;
}
*_nr_write_fields = nr_write_fields;
- *ustctl_fields = fields;
+ *lttng_ust_ctl_fields = fields;
return 0;
error_type:
struct ustcomm_notify_event_reply r;
} reply;
size_t signature_len, fields_len, model_emf_uri_len;
- struct ustctl_field *fields = NULL;
+ struct lttng_ust_ctl_field *fields = NULL;
size_t nr_write_fields = 0;
int ret;
memset(&msg, 0, sizeof(msg));
- msg.header.notify_cmd = USTCTL_NOTIFY_CMD_EVENT;
+ msg.header.notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_EVENT;
msg.m.session_objd = session_objd;
msg.m.channel_objd = channel_objd;
strncpy(msg.m.event_name, event_name, LTTNG_UST_ABI_SYM_NAME_LEN);
struct ustcomm_notify_enum_reply r;
} reply;
size_t entries_len;
- struct ustctl_enum_entry *entries = NULL;
+ struct lttng_ust_ctl_enum_entry *entries = NULL;
int ret;
memset(&msg, 0, sizeof(msg));
- msg.header.notify_cmd = USTCTL_NOTIFY_CMD_ENUM;
+ msg.header.notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_ENUM;
msg.m.session_objd = session_objd;
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';
struct ustcomm_notify_channel_reply r;
} reply;
size_t fields_len;
- struct ustctl_field *fields = NULL;
+ struct lttng_ust_ctl_field *fields = NULL;
int ret;
size_t nr_write_fields = 0;
memset(&msg, 0, sizeof(msg));
- msg.header.notify_cmd = USTCTL_NOTIFY_CMD_CHANNEL;
+ msg.header.notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_CHANNEL;
msg.m.session_objd = session_objd;
msg.m.channel_objd = channel_objd;
struct lttng_integer_type;
struct lttng_ust_session;
-struct ustctl_reg_msg {
+struct lttng_ust_ctl_reg_msg {
uint32_t magic;
uint32_t major;
uint32_t minor;
uint32_t uint32_t_alignment;
uint32_t uint64_t_alignment;
uint32_t long_alignment;
- uint32_t socket_type; /* enum ustctl_socket_type */
+ uint32_t socket_type; /* enum lttng_ust_ctl_socket_type */
char name[LTTNG_UST_ABI_PROCNAME_LEN]; /* process name */
char padding[LTTNG_UST_COMM_REG_MSG_PADDING];
} __attribute__((packed));
struct ustcomm_notify_channel_reply {
int32_t ret_code; /* 0: ok, negative: error code */
uint32_t chan_id;
- uint32_t header_type; /* enum ustctl_channel_header */
+ uint32_t header_type; /* enum lttng_ust_ctl_channel_header */
char padding[USTCOMM_NOTIFY_CHANNEL_REPLY_PADDING];
} __attribute__((packed));
* Returns -EPIPE or -ECONNRESET if other end has hung up.
*/
int ustcomm_send_reg_msg(int sock,
- enum ustctl_socket_type type,
+ enum lttng_ust_ctl_socket_type type,
uint32_t bits_per_long,
uint32_t uint8_t_alignment,
uint32_t uint16_t_alignment,
/*
* Channel representation within consumer.
*/
-struct ustctl_consumer_channel {
+struct lttng_ust_ctl_consumer_channel {
struct lttng_ust_channel_buffer *chan; /* lttng channel buffers */
/* initial attributes */
- struct ustctl_consumer_channel_attr attr;
+ struct lttng_ust_ctl_consumer_channel_attr attr;
int wait_fd; /* monitor close() */
int wakeup_fd; /* monitor close() */
};
/*
* Stream representation within consumer.
*/
-struct ustctl_consumer_stream {
+struct lttng_ust_ctl_consumer_stream {
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *chan;
+ struct lttng_ust_ctl_consumer_channel *chan;
int shm_fd, wait_fd, wakeup_fd;
int cpu;
uint64_t memory_map_size;
};
-#define USTCTL_COUNTER_ATTR_DIMENSION_MAX 8
-struct ustctl_counter_attr {
- enum ustctl_counter_arithmetic arithmetic;
- enum ustctl_counter_bitness bitness;
+#define LTTNG_UST_CTL_COUNTER_ATTR_DIMENSION_MAX 8
+struct lttng_ust_ctl_counter_attr {
+ enum lttng_ust_ctl_counter_arithmetic arithmetic;
+ enum lttng_ust_ctl_counter_bitness bitness;
uint32_t nr_dimensions;
int64_t global_sum_step;
- struct ustctl_counter_dimension dimensions[USTCTL_COUNTER_ATTR_DIMENSION_MAX];
+ struct lttng_ust_ctl_counter_dimension dimensions[LTTNG_UST_CTL_COUNTER_ATTR_DIMENSION_MAX];
bool coalesce_hits;
};
/*
* Counter representation within daemon.
*/
-struct ustctl_daemon_counter {
+struct lttng_ust_ctl_daemon_counter {
struct lib_counter *counter;
const struct lttng_counter_ops *ops;
- struct ustctl_counter_attr *attr; /* initial attributes */
+ struct lttng_ust_ctl_counter_attr *attr; /* initial attributes */
};
-int ustctl_release_handle(int sock, int handle)
+int lttng_ust_ctl_release_handle(int sock, int handle)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
* If sock is negative, it means we don't have to notify the other side
* (e.g. application has already vanished).
*/
-int ustctl_release_object(int sock, struct lttng_ust_abi_object_data *data)
+int lttng_ust_ctl_release_object(int sock, struct lttng_ust_abi_object_data *data)
{
int ret;
default:
assert(0);
}
- return ustctl_release_handle(sock, data->handle);
+ return lttng_ust_ctl_release_handle(sock, data->handle);
}
/*
* Send registration done packet to the application.
*/
-int ustctl_register_done(int sock)
+int lttng_ust_ctl_register_done(int sock)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
/*
* returns session handle.
*/
-int ustctl_create_session(int sock)
+int lttng_ust_ctl_create_session(int sock)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return session_handle;
}
-int ustctl_create_event(int sock, struct lttng_ust_abi_event *ev,
+int lttng_ust_ctl_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)
{
return 0;
}
-int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
+int lttng_ust_ctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
struct lttng_ust_abi_object_data *obj_data,
struct lttng_ust_abi_object_data **_context_data)
{
return ret;
}
-int ustctl_set_filter(int sock, struct lttng_ust_abi_filter_bytecode *bytecode,
+int lttng_ust_ctl_set_filter(int sock, struct lttng_ust_abi_filter_bytecode *bytecode,
struct lttng_ust_abi_object_data *obj_data)
{
struct ustcomm_ust_msg lum;
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
-int ustctl_set_capture(int sock, struct lttng_ust_abi_capture_bytecode *bytecode,
+int lttng_ust_ctl_set_capture(int sock, struct lttng_ust_abi_capture_bytecode *bytecode,
struct lttng_ust_abi_object_data *obj_data)
{
struct ustcomm_ust_msg lum;
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
-int ustctl_set_exclusion(int sock, struct lttng_ust_abi_event_exclusion *exclusion,
+int lttng_ust_ctl_set_exclusion(int sock, struct lttng_ust_abi_event_exclusion *exclusion,
struct lttng_ust_abi_object_data *obj_data)
{
struct ustcomm_ust_msg lum;
}
/* Enable event, channel and session ioctl */
-int ustctl_enable(int sock, struct lttng_ust_abi_object_data *object)
+int lttng_ust_ctl_enable(int sock, struct lttng_ust_abi_object_data *object)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
}
/* Disable event, channel and session ioctl */
-int ustctl_disable(int sock, struct lttng_ust_abi_object_data *object)
+int lttng_ust_ctl_disable(int sock, struct lttng_ust_abi_object_data *object)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return 0;
}
-int ustctl_start_session(int sock, int handle)
+int lttng_ust_ctl_start_session(int sock, int handle)
{
struct lttng_ust_abi_object_data obj;
obj.handle = handle;
- return ustctl_enable(sock, &obj);
+ return lttng_ust_ctl_enable(sock, &obj);
}
-int ustctl_stop_session(int sock, int handle)
+int lttng_ust_ctl_stop_session(int sock, int handle)
{
struct lttng_ust_abi_object_data obj;
obj.handle = handle;
- return ustctl_disable(sock, &obj);
+ return lttng_ust_ctl_disable(sock, &obj);
}
-int ustctl_create_event_notifier_group(int sock, int pipe_fd,
+int lttng_ust_ctl_create_event_notifier_group(int sock, int pipe_fd,
struct lttng_ust_abi_object_data **_event_notifier_group_data)
{
struct lttng_ust_abi_object_data *event_notifier_group_data;
return ret;
}
-int ustctl_create_event_notifier(int sock, struct lttng_ust_abi_event_notifier *event_notifier,
+int lttng_ust_ctl_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)
{
return ret;
}
-int ustctl_tracepoint_list(int sock)
+int lttng_ust_ctl_tracepoint_list(int sock)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return tp_list_handle;
}
-int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
+int lttng_ust_ctl_tracepoint_list_get(int sock, int tp_list_handle,
struct lttng_ust_abi_tracepoint_iter *iter)
{
struct ustcomm_ust_msg lum;
return 0;
}
-int ustctl_tracepoint_field_list(int sock)
+int lttng_ust_ctl_tracepoint_field_list(int sock)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return tp_field_list_handle;
}
-int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
+int lttng_ust_ctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
struct lttng_ust_abi_field_iter *iter)
{
struct ustcomm_ust_msg lum;
return 0;
}
-int ustctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v)
+int lttng_ust_ctl_tracer_version(int sock, struct lttng_ust_abi_tracer_version *v)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return 0;
}
-int ustctl_wait_quiescent(int sock)
+int lttng_ust_ctl_wait_quiescent(int sock)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
return 0;
}
-int ustctl_calibrate(int sock __attribute__((unused)),
+int lttng_ust_ctl_calibrate(int sock __attribute__((unused)),
struct lttng_ust_abi_calibrate *calibrate)
{
if (!calibrate)
return -ENOSYS;
}
-int ustctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object)
+int lttng_ust_ctl_sock_flush_buffer(int sock, struct lttng_ust_abi_object_data *object)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
}
static
-int ustctl_send_channel(int sock,
+int lttng_ust_ctl_send_channel(int sock,
enum lttng_ust_abi_chan_type type,
void *data,
uint64_t size,
}
static
-int ustctl_send_stream(int sock,
+int lttng_ust_ctl_send_stream(int sock,
uint32_t stream_nr,
uint64_t memory_map_size,
int shm_fd, int wakeup_fd,
return 0;
}
-int ustctl_recv_channel_from_consumer(int sock,
+int lttng_ust_ctl_recv_channel_from_consumer(int sock,
struct lttng_ust_abi_object_data **_channel_data)
{
struct lttng_ust_abi_object_data *channel_data;
return ret;
}
-int ustctl_recv_stream_from_consumer(int sock,
+int lttng_ust_ctl_recv_stream_from_consumer(int sock,
struct lttng_ust_abi_object_data **_stream_data)
{
struct lttng_ust_abi_object_data *stream_data;
return ret;
}
-int ustctl_send_channel_to_ust(int sock, int session_handle,
+int lttng_ust_ctl_send_channel_to_ust(int sock, int session_handle,
struct lttng_ust_abi_object_data *channel_data)
{
struct ustcomm_ust_msg lum;
if (ret)
return ret;
- ret = ustctl_send_channel(sock,
+ ret = lttng_ust_ctl_send_channel(sock,
channel_data->u.channel.type,
channel_data->u.channel.data,
channel_data->size,
return ret;
}
-int ustctl_send_stream_to_ust(int sock,
+int lttng_ust_ctl_send_stream_to_ust(int sock,
struct lttng_ust_abi_object_data *channel_data,
struct lttng_ust_abi_object_data *stream_data)
{
assert(stream_data);
assert(stream_data->type == LTTNG_UST_ABI_OBJECT_TYPE_STREAM);
- ret = ustctl_send_stream(sock,
+ ret = lttng_ust_ctl_send_stream(sock,
stream_data->u.stream.stream_nr,
stream_data->size,
stream_data->u.stream.shm_fd,
return ustcomm_recv_app_reply(sock, &lur, lum.handle, lum.cmd);
}
-int ustctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
+int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **dest,
struct lttng_ust_abi_object_data *src)
{
struct lttng_ust_abi_object_data *obj;
/* Buffer operations */
-int ustctl_get_nr_stream_per_channel(void)
+int lttng_ust_ctl_get_nr_stream_per_channel(void)
{
return num_possible_cpus();
}
-struct ustctl_consumer_channel *
- ustctl_create_channel(struct ustctl_consumer_channel_attr *attr,
+struct lttng_ust_ctl_consumer_channel *
+ lttng_ust_ctl_create_channel(struct lttng_ust_ctl_consumer_channel_attr *attr,
const int *stream_fds, int nr_stream_fds)
{
- struct ustctl_consumer_channel *chan;
+ struct lttng_ust_ctl_consumer_channel *chan;
const char *transport_name;
struct lttng_transport *transport;
}
chan->chan->ops = &transport->ops;
memcpy(&chan->attr, attr, sizeof(chan->attr));
- chan->wait_fd = ustctl_channel_get_wait_fd(chan);
- chan->wakeup_fd = ustctl_channel_get_wakeup_fd(chan);
+ chan->wait_fd = lttng_ust_ctl_channel_get_wait_fd(chan);
+ chan->wakeup_fd = lttng_ust_ctl_channel_get_wakeup_fd(chan);
return chan;
chan_error:
return NULL;
}
-void ustctl_destroy_channel(struct ustctl_consumer_channel *chan)
+void lttng_ust_ctl_destroy_channel(struct lttng_ust_ctl_consumer_channel *chan)
{
- (void) ustctl_channel_close_wait_fd(chan);
- (void) ustctl_channel_close_wakeup_fd(chan);
+ (void) lttng_ust_ctl_channel_close_wait_fd(chan);
+ (void) lttng_ust_ctl_channel_close_wakeup_fd(chan);
chan->chan->ops->priv->channel_destroy(chan->chan);
free(chan);
}
-int ustctl_send_channel_to_sessiond(int sock,
- struct ustctl_consumer_channel *channel)
+int lttng_ust_ctl_send_channel_to_sessiond(int sock,
+ struct lttng_ust_ctl_consumer_channel *channel)
{
struct shm_object_table *table;
table = channel->chan->priv->rb_chan->handle->table;
if (table->size <= 0)
return -EINVAL;
- return ustctl_send_channel(sock,
+ return lttng_ust_ctl_send_channel(sock,
channel->attr.type,
table->objects[0].memory_map,
table->objects[0].memory_map_size,
0);
}
-int ustctl_send_stream_to_sessiond(int sock,
- struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_send_stream_to_sessiond(int sock,
+ struct lttng_ust_ctl_consumer_stream *stream)
{
if (!stream)
- return ustctl_send_stream(sock, -1U, -1U, -1, -1, 0);
+ return lttng_ust_ctl_send_stream(sock, -1U, -1U, -1, -1, 0);
- return ustctl_send_stream(sock,
+ return lttng_ust_ctl_send_stream(sock,
stream->cpu,
stream->memory_map_size,
stream->shm_fd, stream->wakeup_fd,
0);
}
-int ustctl_write_metadata_to_channel(
- struct ustctl_consumer_channel *channel,
+int lttng_ust_ctl_write_metadata_to_channel(
+ struct lttng_ust_ctl_consumer_channel *channel,
const char *metadata_str, /* NOT null-terminated */
size_t len) /* metadata length */
{
* Write at most one packet in the channel.
* Returns the number of bytes written on success, < 0 on error.
*/
-ssize_t ustctl_write_one_packet_to_channel(
- struct ustctl_consumer_channel *channel,
+ssize_t lttng_ust_ctl_write_one_packet_to_channel(
+ struct lttng_ust_ctl_consumer_channel *channel,
const char *metadata_str, /* NOT null-terminated */
size_t len) /* metadata length */
{
return reserve_len;
}
-int ustctl_channel_close_wait_fd(struct ustctl_consumer_channel *consumer_chan)
+int lttng_ust_ctl_channel_close_wait_fd(struct lttng_ust_ctl_consumer_channel *consumer_chan)
{
struct lttng_ust_ring_buffer_channel *chan;
int ret;
return ret;
}
-int ustctl_channel_close_wakeup_fd(struct ustctl_consumer_channel *consumer_chan)
+int lttng_ust_ctl_channel_close_wakeup_fd(struct lttng_ust_ctl_consumer_channel *consumer_chan)
{
struct lttng_ust_ring_buffer_channel *chan;
int ret;
return ret;
}
-int ustctl_stream_close_wait_fd(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_stream_close_wait_fd(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer_channel *chan;
chan, chan->handle, stream->cpu);
}
-int ustctl_stream_close_wakeup_fd(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_stream_close_wakeup_fd(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer_channel *chan;
chan, chan->handle, stream->cpu);
}
-struct ustctl_consumer_stream *
- ustctl_create_stream(struct ustctl_consumer_channel *channel,
+struct lttng_ust_ctl_consumer_stream *
+ lttng_ust_ctl_create_stream(struct lttng_ust_ctl_consumer_channel *channel,
int cpu)
{
- struct ustctl_consumer_stream *stream;
+ struct lttng_ust_ctl_consumer_stream *stream;
struct lttng_ust_shm_handle *handle;
struct lttng_ust_ring_buffer_channel *rb_chan;
int shm_fd, wait_fd, wakeup_fd;
return NULL;
}
-void ustctl_destroy_stream(struct ustctl_consumer_stream *stream)
+void lttng_ust_ctl_destroy_stream(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
assert(stream);
buf = stream->buf;
consumer_chan = stream->chan;
- (void) ustctl_stream_close_wait_fd(stream);
- (void) ustctl_stream_close_wakeup_fd(stream);
+ (void) lttng_ust_ctl_stream_close_wait_fd(stream);
+ (void) lttng_ust_ctl_stream_close_wakeup_fd(stream);
lib_ring_buffer_release_read(buf, consumer_chan->chan->priv->rb_chan->handle);
free(stream);
}
-int ustctl_channel_get_wait_fd(struct ustctl_consumer_channel *chan)
+int lttng_ust_ctl_channel_get_wait_fd(struct lttng_ust_ctl_consumer_channel *chan)
{
if (!chan)
return -EINVAL;
&chan->chan->priv->rb_chan->handle->chan._ref);
}
-int ustctl_channel_get_wakeup_fd(struct ustctl_consumer_channel *chan)
+int lttng_ust_ctl_channel_get_wakeup_fd(struct lttng_ust_ctl_consumer_channel *chan)
{
if (!chan)
return -EINVAL;
&chan->chan->priv->rb_chan->handle->chan._ref);
}
-int ustctl_stream_get_wait_fd(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_stream_get_wait_fd(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
return shm_get_wait_fd(consumer_chan->chan->priv->rb_chan->handle, &buf->self._ref);
}
-int ustctl_stream_get_wakeup_fd(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_stream_get_wakeup_fd(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
/* For mmap mode, readable without "get" operation */
-void *ustctl_get_mmap_base(struct ustctl_consumer_stream *stream)
+void *lttng_ust_ctl_get_mmap_base(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return NULL;
}
/* returns the length to mmap. */
-int ustctl_get_mmap_len(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_mmap_len(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len)
{
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
unsigned long mmap_buf_len;
struct lttng_ust_ring_buffer_channel *rb_chan;
}
/* returns the maximum size for sub-buffers. */
-int ustctl_get_max_subbuf_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_max_subbuf_size(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len)
{
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
struct lttng_ust_ring_buffer_channel *rb_chan;
if (!stream)
*/
/* returns the offset of the subbuffer belonging to the mmap reader. */
-int ustctl_get_mmap_read_offset(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_mmap_read_offset(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *off)
{
struct lttng_ust_ring_buffer_channel *rb_chan;
unsigned long sb_bindex;
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
struct lttng_ust_ring_buffer_backend_pages_shmp *barray_idx;
struct lttng_ust_ring_buffer_backend_pages *pages;
}
/* returns the size of the current sub-buffer, without padding (for mmap). */
-int ustctl_get_subbuf_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_subbuf_size(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len)
{
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
struct lttng_ust_ring_buffer_channel *rb_chan;
struct lttng_ust_ring_buffer *buf;
}
/* returns the size of the current sub-buffer, without padding (for mmap). */
-int ustctl_get_padded_subbuf_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_padded_subbuf_size(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *len)
{
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
struct lttng_ust_ring_buffer_channel *rb_chan;
struct lttng_ust_ring_buffer *buf;
}
/* Get exclusive read access to the next sub-buffer that can be read. */
-int ustctl_get_next_subbuf(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_get_next_subbuf(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
/* Release exclusive sub-buffer access, move consumer forward. */
-int ustctl_put_next_subbuf(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_put_next_subbuf(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
/* snapshot */
/* Get a snapshot of the current ring buffer producer and consumer positions */
-int ustctl_snapshot(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_snapshot(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
* even if the consumed and produced positions are contained within the same
* subbuffer.
*/
-int ustctl_snapshot_sample_positions(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_snapshot_sample_positions(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
}
/* Get the consumer position (iteration start) */
-int ustctl_snapshot_get_consumed(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_snapshot_get_consumed(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *pos)
{
struct lttng_ust_ring_buffer *buf;
}
/* Get the producer position (iteration end) */
-int ustctl_snapshot_get_produced(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_snapshot_get_produced(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *pos)
{
struct lttng_ust_ring_buffer *buf;
}
/* Get exclusive read access to the specified sub-buffer position */
-int ustctl_get_subbuf(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_subbuf(struct lttng_ust_ctl_consumer_stream *stream,
unsigned long *pos)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
}
/* Release exclusive sub-buffer access */
-int ustctl_put_subbuf(struct ustctl_consumer_stream *stream)
+int lttng_ust_ctl_put_subbuf(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
if (!stream)
return -EINVAL;
return 0;
}
-void ustctl_flush_buffer(struct ustctl_consumer_stream *stream,
+void lttng_ust_ctl_flush_buffer(struct lttng_ust_ctl_consumer_stream *stream,
int producer_active)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
assert(stream);
buf = stream->buf;
consumer_chan->chan->priv->rb_chan->handle);
}
-void ustctl_clear_buffer(struct ustctl_consumer_stream *stream)
+void lttng_ust_ctl_clear_buffer(struct lttng_ust_ctl_consumer_stream *stream)
{
struct lttng_ust_ring_buffer *buf;
- struct ustctl_consumer_channel *consumer_chan;
+ struct lttng_ust_ctl_consumer_channel *consumer_chan;
assert(stream);
buf = stream->buf;
return client_cb;
}
-int ustctl_get_timestamp_begin(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_timestamp_begin(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *timestamp_begin)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->timestamp_begin(buf, chan, timestamp_begin);
}
-int ustctl_get_timestamp_end(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_timestamp_end(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *timestamp_end)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->timestamp_end(buf, chan, timestamp_end);
}
-int ustctl_get_events_discarded(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_events_discarded(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *events_discarded)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->events_discarded(buf, chan, events_discarded);
}
-int ustctl_get_content_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_content_size(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *content_size)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->content_size(buf, chan, content_size);
}
-int ustctl_get_packet_size(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_packet_size(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *packet_size)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->packet_size(buf, chan, packet_size);
}
-int ustctl_get_stream_id(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_stream_id(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *stream_id)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->stream_id(buf, chan, stream_id);
}
-int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_current_timestamp(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *ts)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->current_timestamp(buf, chan, ts);
}
-int ustctl_get_sequence_number(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_sequence_number(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *seq)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
return client_cb->sequence_number(buf, chan, seq);
}
-int ustctl_get_instance_id(struct ustctl_consumer_stream *stream,
+int lttng_ust_ctl_get_instance_id(struct lttng_ust_ctl_consumer_stream *stream,
uint64_t *id)
{
struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
#ifdef HAVE_LINUX_PERF_EVENT_H
-int ustctl_has_perf_counters(void)
+int lttng_ust_ctl_has_perf_counters(void)
{
return 1;
}
#else
-int ustctl_has_perf_counters(void)
+int lttng_ust_ctl_has_perf_counters(void)
{
return 0;
}
*/
static
int get_cred(int sock,
- const struct ustctl_reg_msg *reg_msg,
+ const struct lttng_ust_ctl_reg_msg *reg_msg,
uint32_t *pid,
uint32_t *ppid,
uint32_t *uid,
*/
static
int get_cred(int sock,
- const struct ustctl_reg_msg *reg_msg,
+ const struct lttng_ust_ctl_reg_msg *reg_msg,
uint32_t *pid,
uint32_t *ppid,
uint32_t *uid,
#warning "Using insecure fallback: trusting user id provided by registered applications. Please consider implementing use of unix socket credentials on your platform."
static
int get_cred(int sock,
- const struct ustctl_reg_msg *reg_msg,
+ const struct lttng_ust_ctl_reg_msg *reg_msg,
uint32_t *pid,
uint32_t *ppid,
uint32_t *uid,
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_recv_reg_msg(int sock,
- enum ustctl_socket_type *type,
+int lttng_ust_ctl_recv_reg_msg(int sock,
+ enum lttng_ust_ctl_socket_type *type,
uint32_t *major,
uint32_t *minor,
uint32_t *pid,
char *name)
{
ssize_t len;
- struct ustctl_reg_msg reg_msg;
+ struct lttng_ust_ctl_reg_msg reg_msg;
len = ustcomm_recv_unix_sock(sock, ®_msg, sizeof(reg_msg));
if (len > 0 && len != sizeof(reg_msg))
return -LTTNG_UST_ERR_INVAL_MAGIC;
}
switch (reg_msg.socket_type) {
- case 0: *type = USTCTL_SOCKET_CMD;
+ case 0: *type = LTTNG_UST_CTL_SOCKET_CMD;
break;
- case 1: *type = USTCTL_SOCKET_NOTIFY;
+ case 1: *type = LTTNG_UST_CTL_SOCKET_NOTIFY;
break;
default:
return -LTTNG_UST_ERR_INVAL_SOCKET_TYPE;
return get_cred(sock, ®_msg, pid, ppid, uid, gid);
}
-int ustctl_recv_notify(int sock, enum ustctl_notify_cmd *notify_cmd)
+int lttng_ust_ctl_recv_notify(int sock, enum lttng_ust_ctl_notify_cmd *notify_cmd)
{
struct ustcomm_notify_hdr header;
ssize_t len;
return len;
switch (header.notify_cmd) {
case 0:
- *notify_cmd = USTCTL_NOTIFY_CMD_EVENT;
+ *notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_EVENT;
break;
case 1:
- *notify_cmd = USTCTL_NOTIFY_CMD_CHANNEL;
+ *notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_CHANNEL;
break;
case 2:
- *notify_cmd = USTCTL_NOTIFY_CMD_ENUM;
+ *notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_ENUM;
break;
default:
return -EINVAL;
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_recv_register_event(int sock,
+int lttng_ust_ctl_recv_register_event(int sock,
int *session_objd,
int *channel_objd,
char *event_name,
int *loglevel,
char **signature,
size_t *nr_fields,
- struct ustctl_field **fields,
+ struct lttng_ust_ctl_field **fields,
char **model_emf_uri)
{
ssize_t len;
struct ustcomm_notify_event_msg msg;
size_t signature_len, fields_len, model_emf_uri_len;
char *a_sign = NULL, *a_model_emf_uri = NULL;
- struct ustctl_field *a_fields = NULL;
+ struct lttng_ust_ctl_field *a_fields = NULL;
len = ustcomm_recv_unix_sock(sock, &msg, sizeof(msg));
if (len > 0 && len != sizeof(msg))
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_reply_register_event(int sock,
+int lttng_ust_ctl_reply_register_event(int sock,
uint32_t id,
int ret_code)
{
} reply;
memset(&reply, 0, sizeof(reply));
- reply.header.notify_cmd = USTCTL_NOTIFY_CMD_EVENT;
+ reply.header.notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_EVENT;
reply.r.ret_code = ret_code;
reply.r.event_id = id;
len = ustcomm_send_unix_sock(sock, &reply, sizeof(reply));
/*
* Returns 0 on success, negative UST or system error value on error.
*/
-int ustctl_recv_register_enum(int sock,
+int lttng_ust_ctl_recv_register_enum(int sock,
int *session_objd,
char *enum_name,
- struct ustctl_enum_entry **entries,
+ struct lttng_ust_ctl_enum_entry **entries,
size_t *nr_entries)
{
ssize_t len;
struct ustcomm_notify_enum_msg msg;
size_t entries_len;
- struct ustctl_enum_entry *a_entries = NULL;
+ struct lttng_ust_ctl_enum_entry *a_entries = NULL;
len = ustcomm_recv_unix_sock(sock, &msg, sizeof(msg));
if (len > 0 && len != sizeof(msg))
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_reply_register_enum(int sock,
+int lttng_ust_ctl_reply_register_enum(int sock,
uint64_t id,
int ret_code)
{
} reply;
memset(&reply, 0, sizeof(reply));
- reply.header.notify_cmd = USTCTL_NOTIFY_CMD_ENUM;
+ reply.header.notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_ENUM;
reply.r.ret_code = ret_code;
reply.r.enum_id = id;
len = ustcomm_send_unix_sock(sock, &reply, sizeof(reply));
/*
* Returns 0 on success, negative UST or system error value on error.
*/
-int ustctl_recv_register_channel(int sock,
+int lttng_ust_ctl_recv_register_channel(int sock,
int *session_objd, /* session descriptor (output) */
int *channel_objd, /* channel descriptor (output) */
size_t *nr_fields,
- struct ustctl_field **fields)
+ struct lttng_ust_ctl_field **fields)
{
ssize_t len;
struct ustcomm_notify_channel_msg msg;
size_t fields_len;
- struct ustctl_field *a_fields;
+ struct lttng_ust_ctl_field *a_fields;
len = ustcomm_recv_unix_sock(sock, &msg, sizeof(msg));
if (len > 0 && len != sizeof(msg))
/*
* Returns 0 on success, negative error value on error.
*/
-int ustctl_reply_register_channel(int sock,
+int lttng_ust_ctl_reply_register_channel(int sock,
uint32_t chan_id,
- enum ustctl_channel_header header_type,
+ enum lttng_ust_ctl_channel_header header_type,
int ret_code)
{
ssize_t len;
} reply;
memset(&reply, 0, sizeof(reply));
- reply.header.notify_cmd = USTCTL_NOTIFY_CMD_CHANNEL;
+ reply.header.notify_cmd = LTTNG_UST_CTL_NOTIFY_CMD_CHANNEL;
reply.r.ret_code = ret_code;
reply.r.chan_id = chan_id;
switch (header_type) {
- case USTCTL_CHANNEL_HEADER_COMPACT:
+ case LTTNG_UST_CTL_CHANNEL_HEADER_COMPACT:
reply.r.header_type = 1;
break;
- case USTCTL_CHANNEL_HEADER_LARGE:
+ case LTTNG_UST_CTL_CHANNEL_HEADER_LARGE:
reply.r.header_type = 2;
break;
default:
}
/* Regenerate the statedump. */
-int ustctl_regenerate_statedump(int sock, int handle)
+int lttng_ust_ctl_regenerate_statedump(int sock, int handle)
{
struct ustcomm_ust_msg lum;
struct ustcomm_ust_reply lur;
/* counter operations */
-int ustctl_get_nr_cpu_per_counter(void)
+int lttng_ust_ctl_get_nr_cpu_per_counter(void)
{
return num_possible_cpus();
}
-struct ustctl_daemon_counter *
- ustctl_create_counter(size_t nr_dimensions,
- const struct ustctl_counter_dimension *dimensions,
+struct lttng_ust_ctl_daemon_counter *
+ lttng_ust_ctl_create_counter(size_t nr_dimensions,
+ const struct lttng_ust_ctl_counter_dimension *dimensions,
int64_t global_sum_step,
int global_counter_fd,
int nr_counter_cpu_fds,
const int *counter_cpu_fds,
- enum ustctl_counter_bitness bitness,
- enum ustctl_counter_arithmetic arithmetic,
+ enum lttng_ust_ctl_counter_bitness bitness,
+ enum lttng_ust_ctl_counter_arithmetic arithmetic,
uint32_t alloc_flags,
bool coalesce_hits)
{
const char *transport_name;
- struct ustctl_daemon_counter *counter;
+ struct lttng_ust_ctl_daemon_counter *counter;
struct lttng_counter_transport *transport;
struct lttng_counter_dimension ust_dim[LTTNG_COUNTER_DIMENSION_MAX];
size_t i;
return NULL;
/* Currently, only per-cpu allocation is supported. */
switch (alloc_flags) {
- case USTCTL_COUNTER_ALLOC_PER_CPU:
+ case LTTNG_UST_CTL_COUNTER_ALLOC_PER_CPU:
break;
- case USTCTL_COUNTER_ALLOC_PER_CPU | USTCTL_COUNTER_ALLOC_GLOBAL:
- case USTCTL_COUNTER_ALLOC_GLOBAL:
+ case LTTNG_UST_CTL_COUNTER_ALLOC_PER_CPU | LTTNG_UST_CTL_COUNTER_ALLOC_GLOBAL:
+ case LTTNG_UST_CTL_COUNTER_ALLOC_GLOBAL:
default:
return NULL;
}
switch (bitness) {
- case USTCTL_COUNTER_BITNESS_32:
+ case LTTNG_UST_CTL_COUNTER_BITNESS_32:
switch (arithmetic) {
- case USTCTL_COUNTER_ARITHMETIC_MODULAR:
+ case LTTNG_UST_CTL_COUNTER_ARITHMETIC_MODULAR:
transport_name = "counter-per-cpu-32-modular";
break;
- case USTCTL_COUNTER_ARITHMETIC_SATURATION:
+ case LTTNG_UST_CTL_COUNTER_ARITHMETIC_SATURATION:
transport_name = "counter-per-cpu-32-saturation";
break;
default:
return NULL;
}
break;
- case USTCTL_COUNTER_BITNESS_64:
+ case LTTNG_UST_CTL_COUNTER_BITNESS_64:
switch (arithmetic) {
- case USTCTL_COUNTER_ARITHMETIC_MODULAR:
+ case LTTNG_UST_CTL_COUNTER_ARITHMETIC_MODULAR:
transport_name = "counter-per-cpu-64-modular";
break;
- case USTCTL_COUNTER_ARITHMETIC_SATURATION:
+ case LTTNG_UST_CTL_COUNTER_ARITHMETIC_SATURATION:
transport_name = "counter-per-cpu-64-saturation";
break;
default:
return NULL;
}
-int ustctl_create_counter_data(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_create_counter_data(struct lttng_ust_ctl_daemon_counter *counter,
struct lttng_ust_abi_object_data **_counter_data)
{
struct lttng_ust_abi_object_data *counter_data;
int ret;
switch (counter->attr->arithmetic) {
- case USTCTL_COUNTER_ARITHMETIC_MODULAR:
+ case LTTNG_UST_CTL_COUNTER_ARITHMETIC_MODULAR:
counter_conf.arithmetic = LTTNG_UST_ABI_COUNTER_ARITHMETIC_MODULAR;
break;
- case USTCTL_COUNTER_ARITHMETIC_SATURATION:
+ case LTTNG_UST_CTL_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:
+ case LTTNG_UST_CTL_COUNTER_BITNESS_32:
counter_conf.bitness = LTTNG_UST_ABI_COUNTER_BITNESS_32;
break;
- case USTCTL_COUNTER_BITNESS_64:
+ case LTTNG_UST_CTL_COUNTER_BITNESS_64:
counter_conf.bitness = LTTNG_UST_ABI_COUNTER_BITNESS_64;
break;
default:
return ret;
}
-int ustctl_create_counter_global_data(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_create_counter_global_data(struct lttng_ust_ctl_daemon_counter *counter,
struct lttng_ust_abi_object_data **_counter_global_data)
{
struct lttng_ust_abi_object_data *counter_global_data;
return ret;
}
-int ustctl_create_counter_cpu_data(struct ustctl_daemon_counter *counter, int cpu,
+int lttng_ust_ctl_create_counter_cpu_data(struct lttng_ust_ctl_daemon_counter *counter, int cpu,
struct lttng_ust_abi_object_data **_counter_cpu_data)
{
struct lttng_ust_abi_object_data *counter_cpu_data;
return ret;
}
-void ustctl_destroy_counter(struct ustctl_daemon_counter *counter)
+void lttng_ust_ctl_destroy_counter(struct lttng_ust_ctl_daemon_counter *counter)
{
counter->ops->counter_destroy(counter->counter);
free(counter->attr);
free(counter);
}
-int ustctl_send_counter_data_to_ust(int sock, int parent_handle,
+int lttng_ust_ctl_send_counter_data_to_ust(int sock, int parent_handle,
struct lttng_ust_abi_object_data *counter_data)
{
struct ustcomm_ust_msg lum;
return ret;
}
-int ustctl_send_counter_global_data_to_ust(int sock,
+int lttng_ust_ctl_send_counter_global_data_to_ust(int sock,
struct lttng_ust_abi_object_data *counter_data,
struct lttng_ust_abi_object_data *counter_global_data)
{
return ret;
}
-int ustctl_send_counter_cpu_data_to_ust(int sock,
+int lttng_ust_ctl_send_counter_cpu_data_to_ust(int sock,
struct lttng_ust_abi_object_data *counter_data,
struct lttng_ust_abi_object_data *counter_cpu_data)
{
return ret;
}
-int ustctl_counter_read(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_counter_read(struct lttng_ust_ctl_daemon_counter *counter,
const size_t *dimension_indexes,
int cpu, int64_t *value,
bool *overflow, bool *underflow)
value, overflow, underflow);
}
-int ustctl_counter_aggregate(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_counter_aggregate(struct lttng_ust_ctl_daemon_counter *counter,
const size_t *dimension_indexes,
int64_t *value,
bool *overflow, bool *underflow)
value, overflow, underflow);
}
-int ustctl_counter_clear(struct ustctl_daemon_counter *counter,
+int lttng_ust_ctl_counter_clear(struct lttng_ust_ctl_daemon_counter *counter,
const size_t *dimension_indexes)
{
return counter->ops->counter_clear(counter->counter, dimension_indexes);
}
static
-void ustctl_exit(void)
+void lttng_ust_ctl_exit(void)
__attribute__((destructor));
static
-void ustctl_exit(void)
+void lttng_ust_ctl_exit(void)
{
lttng_ust_counter_clients_exit();
lttng_ust_ring_buffer_clients_exit();
}
static
-int register_to_sessiond(int socket, enum ustctl_socket_type type)
+int register_to_sessiond(int socket, enum lttng_ust_ctl_socket_type type)
{
return ustcomm_send_reg_msg(socket,
type,
sock_info->root_handle = ret;
}
- ret = register_to_sessiond(sock_info->socket, USTCTL_SOCKET_CMD);
+ ret = register_to_sessiond(sock_info->socket, LTTNG_UST_CTL_SOCKET_CMD);
if (ret < 0) {
ERR("Error registering to %s ust cmd socket",
sock_info->name);
}
ret = register_to_sessiond(sock_info->notify_socket,
- USTCTL_SOCKET_NOTIFY);
+ LTTNG_UST_CTL_SOCKET_NOTIFY);
if (ret < 0) {
ERR("Error registering to %s ust notify socket",
sock_info->name);