From: Mathieu Desnoyers Date: Tue, 16 Jul 2013 01:28:23 +0000 (-0400) Subject: consumer: remove unused lttng_ustconsumer_push_metadata X-Git-Tag: v2.3.0-rc1~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=843c71c5b9f7f6b04c5a1751a4679310dd07033b;p=lttng-tools.git consumer: remove unused lttng_ustconsumer_push_metadata Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 21d7050b6..e933f9227 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -550,43 +550,6 @@ error: return ret; } -/* - * Write metadata to the given channel using ustctl to convert the string to - * the ringbuffer. - * Called only from consumer_metadata_cache_write. - * The metadata cache lock MUST be acquired to write in the cache. - * - * Return 0 on success else a negative value. - */ -int lttng_ustconsumer_push_metadata(struct lttng_consumer_channel *metadata, - const char *metadata_str, uint64_t target_offset, uint64_t len) -{ - int ret; - - assert(metadata); - assert(metadata_str); - - DBG("UST consumer writing metadata to channel %s", metadata->name); - - if (!metadata->metadata_stream) { - ret = 0; - goto error; - } - - assert(target_offset <= metadata->metadata_cache->max_offset); - ret = ustctl_write_metadata_to_channel(metadata->uchan, - metadata_str + target_offset, len); - if (ret < 0) { - ERR("ustctl write metadata fail with ret %d, len %" PRIu64, ret, len); - goto error; - } - - ustctl_flush_buffer(metadata->metadata_stream->ustream, 1); - -error: - return ret; -} - /* * Flush channel's streams using the given key to retrieve the channel. * diff --git a/src/common/ust-consumer/ust-consumer.h b/src/common/ust-consumer/ust-consumer.h index 191cdabf8..e65acac0b 100644 --- a/src/common/ust-consumer/ust-consumer.h +++ b/src/common/ust-consumer/ust-consumer.h @@ -55,8 +55,6 @@ void lttng_ustconsumer_close_metadata(struct lttng_ht *ht); void lttng_ustconsumer_close_stream_wakeup(struct lttng_consumer_stream *stream); int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset, uint64_t len, struct lttng_consumer_channel *channel); -int lttng_ustconsumer_push_metadata(struct lttng_consumer_channel *metadata, - const char *metadata_str, uint64_t target_offset, uint64_t len); int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx, struct lttng_consumer_channel *channel); @@ -171,12 +169,6 @@ int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset, return -ENOSYS; } static inline -int lttng_ustconsumer_push_metadata(struct lttng_consumer_channel *metadata, - const char *metadata_str, uint64_t target_offset, uint64_t len) -{ - return -ENOSYS; -} -static inline int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx, struct lttng_consumer_channel *channel) {