Fix: compile without UST support
authorDavid Goulet <dgoulet@efficios.com>
Fri, 27 Sep 2013 18:20:51 +0000 (14:20 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 27 Sep 2013 18:20:51 +0000 (14:20 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer-timer.c
src/common/ust-consumer/ust-consumer.c
src/common/ust-consumer/ust-consumer.h

index 0f5d4ba9655d6985a656b069fcb83843d310f3a9..05a09c2349af27aacf9b4332387e53d29de579f1 100644 (file)
@@ -191,13 +191,13 @@ static int check_ust_stream(struct lttng_consumer_stream *stream)
                goto error_unlock;
        }
 
-       ret = ustctl_get_current_timestamp(stream->ustream, &ts);
+       ret = lttng_ustconsumer_get_current_timestamp(stream, &ts);
        if (ret < 0) {
                ERR("Failed to get the current timestamp");
                goto error_unlock;
        }
-       ustctl_flush_buffer(stream->ustream, 1);
-       ret = ustctl_snapshot(stream->ustream);
+       lttng_ustconsumer_flush_buffer(stream, 1);
+       ret = lttng_ustconsumer_take_snapshot(stream);
        if (ret < 0) {
                if (ret != -EAGAIN) {
                        ERR("Taking UST snapshot");
index 2d3d89c7c66e4349aa9e5141a5229ade6ba32451..6a508143e0d7ab22796e3e9ad6fcf233258ae2bc 100644 (file)
@@ -1573,6 +1573,25 @@ int lttng_ustconsumer_get_consumed_snapshot(
        return ustctl_snapshot_get_consumed(stream->ustream, pos);
 }
 
+void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
+               int producer)
+{
+       assert(stream);
+       assert(stream->ustream);
+
+       ustctl_flush_buffer(stream->ustream, producer);
+}
+
+int lttng_ustconsumer_get_current_timestamp(
+               struct lttng_consumer_stream *stream, uint64_t *ts)
+{
+       assert(stream);
+       assert(stream->ustream);
+       assert(ts);
+
+       return ustctl_get_current_timestamp(stream->ustream, ts);
+}
+
 /*
  * Called when the stream signal the consumer that it has hang up.
  */
index bf005c30d372661d43d62ad103a575e1419a0f83..2dfd2e43c3dcf47c8ab73f3728e343bc8038de93 100644 (file)
@@ -60,6 +60,10 @@ int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
                struct lttng_consumer_channel *channel, int timer, int wait);
 int lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
                struct lttng_consumer_stream *metadata);
+void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
+               int producer);
+int lttng_ustconsumer_get_current_timestamp(
+               struct lttng_consumer_stream *stream, uint64_t *ts);
 
 #else /* HAVE_LIBLTTNG_UST_CTL */
 
@@ -174,7 +178,7 @@ int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset,
 }
 static inline
 int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
-               struct lttng_consumer_channel *channel, int timer)
+               struct lttng_consumer_channel *channel, int timer, int wait)
 {
        return -ENOSYS;
 }
@@ -184,6 +188,17 @@ int lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
 {
        return -ENOSYS;
 }
+static inline
+void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
+               int producer)
+{
+}
+static inline
+int lttng_ustconsumer_get_current_timestamp(
+               struct lttng_consumer_stream *stream, uint64_t *ts)
+{
+       return -ENOSYS;
+}
 #endif /* HAVE_LIBLTTNG_UST_CTL */
 
 #endif /* _LTTNG_USTCONSUMER_H */
This page took 0.027877 seconds and 4 git commands to generate.