X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=7a5f969eecd4ebd0fe50a0715e5d5e273dbbcbaf;hb=c785c634a51956094130218c2bffeff32756cb69;hp=3c81e509a4af551e54ab0db2e0e6da9caad14370;hpb=3ef94b0eba0a0ed8c8552e0284d4084f98be475f;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index 3c81e509..7a5f969e 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 @@ -73,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); @@ -145,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(). @@ -220,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 { @@ -230,6 +255,7 @@ enum ustctl_socket_type { enum ustctl_notify_cmd { USTCTL_NOTIFY_CMD_EVENT = 0, USTCTL_NOTIFY_CMD_CHANNEL = 1, + USTCTL_NOTIFY_CMD_ENUM = 2, }; enum ustctl_channel_header { @@ -277,9 +303,21 @@ struct ustctl_float_type { char padding[USTCTL_UST_FLOAT_TYPE_PADDING]; } LTTNG_PACKED; +#define USTCTL_UST_ENUM_ENTRY_PADDING 32 +struct ustctl_enum_entry { + uint64_t start, end; /* start and end are inclusive */ + char string[LTTNG_UST_SYM_NAME_LEN]; + char padding[USTCTL_UST_ENUM_ENTRY_PADDING]; +}; + #define USTCTL_UST_BASIC_TYPE_PADDING 296 union _ustctl_basic_type { struct ustctl_integer_type integer; + struct { + char name[LTTNG_UST_SYM_NAME_LEN]; + struct ustctl_integer_type container_type; + uint64_t id; /* enum ID in sessiond. */ + } enumeration; struct { enum ustctl_string_encodings encoding; } string; @@ -378,6 +416,22 @@ int ustctl_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 *session_objd, + char *enum_name, + struct ustctl_enum_entry **entries, + size_t *nr_entries); + +/* + * Returns 0 on success, negative error value on error. + */ +int ustctl_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. */