X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=40e831e585fb44facd555841256d1f0ed4063e80;hb=0bfb5cbd86f8dfe42c2f00f524e63de93133b2c9;hp=ae4f3089bd41f5d1347763266725adc7cfe973ba;hpb=32ce85691c17b331072b1c0df96f69e8b388d134;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index ae4f3089..40e831e5 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -50,6 +50,7 @@ struct ustctl_consumer_channel_attr { unsigned int switch_timer_interval; /* usec */ unsigned int read_timer_interval; /* usec */ enum lttng_ust_output output; /* splice, mmap */ + uint32_t chan_id; /* channel ID */ unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */ } LTTNG_PACKED; @@ -72,6 +73,8 @@ int ustctl_add_context(int sock, struct lttng_ust_context *ctx, 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_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); @@ -128,6 +131,14 @@ int ustctl_send_stream_to_ust(int sock, struct lttng_ust_object_data *channel_data, struct lttng_ust_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); + /* * API used by consumer. */ @@ -146,6 +157,20 @@ void ustctl_destroy_channel(struct ustctl_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 ustctl_write_metadata_to_channel( + struct ustctl_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, + 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. @@ -154,6 +179,8 @@ 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); /* Create/destroy stream buffers for read */ struct ustctl_consumer_stream * @@ -161,9 +188,6 @@ struct ustctl_consumer_stream * int cpu); void ustctl_destroy_stream(struct ustctl_consumer_stream *stream); -int ustctl_get_wait_fd(struct ustctl_consumer_stream *stream); -int ustctl_get_wakeup_fd(struct ustctl_consumer_stream *stream); - /* For mmap mode, readable without "get" operation */ int ustctl_get_mmap_len(struct ustctl_consumer_stream *stream, unsigned long *len); @@ -198,6 +222,22 @@ int ustctl_put_subbuf(struct ustctl_consumer_stream *stream); void ustctl_flush_buffer(struct ustctl_consumer_stream *stream, int producer_active); +/* index */ +int ustctl_get_timestamp_begin(struct ustctl_consumer_stream *stream, + uint64_t *timestamp_begin); +int ustctl_get_timestamp_end(struct ustctl_consumer_stream *stream, + uint64_t *timestamp_end); +int ustctl_get_events_discarded(struct ustctl_consumer_stream *stream, + uint64_t *events_discarded); +int ustctl_get_content_size(struct ustctl_consumer_stream *stream, + uint64_t *content_size); +int ustctl_get_packet_size(struct ustctl_consumer_stream *stream, + uint64_t *packet_size); +int ustctl_get_stream_id(struct ustctl_consumer_stream *stream, + uint64_t *stream_id); +int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream, + uint64_t *ts); + /* event registry management */ enum ustctl_socket_type {