X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=78e0cf727feb1a91c150c2a5b308bd8d3750c710;hb=c7ea8487b97b4552a9fcf214a45e104c5f771c85;hp=ed2b513d05b4abd3bc6afceb95567a7e1f7913e7;hpb=ff0f57289ff0e6be25424081fabbbfc0e3b1b565;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index ed2b513d..78e0cf72 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -21,6 +21,7 @@ #include #include +#include #ifndef LTTNG_UST_UUID_LEN #define LTTNG_UST_UUID_LEN 16 @@ -50,6 +51,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 +74,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 +132,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. */ @@ -136,8 +148,11 @@ struct ustctl_consumer_channel; struct ustctl_consumer_stream; struct ustctl_consumer_channel_attr; +int ustctl_get_nr_stream_per_channel(void); + struct ustctl_consumer_channel * - ustctl_create_channel(struct ustctl_consumer_channel_attr *attr); + ustctl_create_channel(struct ustctl_consumer_channel_attr *attr, + const int *stream_fds, int nr_stream_fds); /* * Each stream created needs to be destroyed before calling * ustctl_destroy_channel(). @@ -155,6 +170,10 @@ 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 @@ -207,6 +226,25 @@ 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); + +/* returns whether UST has perf counters support. */ +int ustctl_has_perf_counters(void); + /* event registry management */ enum ustctl_socket_type {