X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=d9eba3ef3bffac24928f8e233c9baa76fb68dd2a;hb=fd46f5c79a6a7178e35ce4f8ea21caa30da45cc4;hp=f6c1dc4527c4d64a4318a54375d3e5ee70c94e99;hpb=f45930b75b297a5f80fe14ef2550b196ca750b4a;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index f6c1dc45..d9eba3ef 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -23,6 +23,14 @@ #include #include +#ifndef LTTNG_PACKED +#error "LTTNG_PACKED should be defined" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + #ifndef LTTNG_UST_UUID_LEN #define LTTNG_UST_UUID_LEN 16 #endif @@ -53,6 +61,7 @@ struct ustctl_consumer_channel_attr { enum lttng_ust_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) */ } LTTNG_PACKED; /* @@ -237,8 +246,15 @@ int ustctl_put_subbuf(struct ustctl_consumer_stream *stream); void ustctl_flush_buffer(struct ustctl_consumer_stream *stream, int producer_active); +void ustctl_clear_buffer(struct ustctl_consumer_stream *stream); /* index */ + +/* + * Getters which need to be used on the current packet (between get/put + * or get_next/put_next. + */ + int ustctl_get_timestamp_begin(struct ustctl_consumer_stream *stream, uint64_t *timestamp_begin); int ustctl_get_timestamp_end(struct ustctl_consumer_stream *stream, @@ -249,15 +265,26 @@ 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); int ustctl_get_sequence_number(struct ustctl_consumer_stream *stream, uint64_t *seq); + +/* + * Getter returning state invariant for the stream, which can be used + * without "get" operation. + */ + +int ustctl_get_stream_id(struct ustctl_consumer_stream *stream, + uint64_t *stream_id); int ustctl_get_instance_id(struct ustctl_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, + uint64_t *ts); + /* returns whether UST has perf counters support. */ int ustctl_has_perf_counters(void); @@ -495,4 +522,8 @@ int ustctl_reply_register_channel(int sock, enum ustctl_channel_header header_type, int ret_code); /* return code. 0 ok, negative error */ +#ifdef __cplusplus +} +#endif + #endif /* _LTTNG_UST_CTL_H */