X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=liblttng-ust-ctl%2Fustctl.c;h=0165786c256b18203f49e9951132ead745ad638e;hb=c307106d82123361130c7362e82994d72ab170b1;hp=10fb9c4921f36ba4b4955fe90b892aeb9ce08e9b;hpb=53f0df512fb13a5c1b9609a001f9afd5114f2991;p=lttng-ust.git diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 10fb9c49..0165786c 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -1708,6 +1708,40 @@ int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream, return client_cb->current_timestamp(buf, handle, ts); } +int ustctl_get_sequence_number(struct ustctl_consumer_stream *stream, + uint64_t *seq) +{ + struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb; + struct lttng_ust_lib_ring_buffer *buf; + struct lttng_ust_shm_handle *handle; + + if (!stream || !seq) + return -EINVAL; + buf = stream->buf; + handle = stream->chan->chan->handle; + client_cb = get_client_cb(buf, handle); + if (!client_cb || !client_cb->sequence_number) + return -ENOSYS; + return client_cb->sequence_number(buf, handle, seq); +} + +int ustctl_get_instance_id(struct ustctl_consumer_stream *stream, + uint64_t *id) +{ + struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb; + struct lttng_ust_lib_ring_buffer *buf; + struct lttng_ust_shm_handle *handle; + + if (!stream || !id) + return -EINVAL; + buf = stream->buf; + handle = stream->chan->chan->handle; + client_cb = get_client_cb(buf, handle); + if (!client_cb) + return -ENOSYS; + return client_cb->instance_id(buf, handle, id); +} + #if defined(__x86_64__) || defined(__i386__) int ustctl_has_perf_counters(void)