X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=2f09eac80763e2c20ae60b83e38e4593d5f84346;hb=23d565989350c270c68e9a6c8edfbe2dd6a6895d;hp=e5143cd4a5f38afbc8e77189135c68fff25e4e96;hpb=d42266a417afa6e8ca6024590b8282002aebca07;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index e5143cd4a..2f09eac80 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -2789,7 +2789,7 @@ int lttng_ustconsumer_read_subbuffer(struct lttng_consumer_stream *stream, struct lttng_consumer_local_data *ctx) { unsigned long len, subbuf_size, padding; - int err, write_index = 1, rotation_ret; + int err, write_index = 1; long ret = 0; struct ustctl_consumer_stream *ustream; struct ctf_packet_index index; @@ -2827,20 +2827,6 @@ int lttng_ustconsumer_read_subbuffer(struct lttng_consumer_stream *stream, } } - /* - * If the stream was flagged to be ready for rotation before we extract the - * next packet, rotate it now. - */ - if (stream->rotate_ready) { - DBG("Rotate stream before extracting data"); - rotation_ret = lttng_consumer_rotate_stream(ctx, stream); - if (rotation_ret < 0) { - ERR("Stream rotation error"); - ret = -1; - goto error; - } - } - retry: /* Get the next subbuffer */ err = ustctl_get_next_subbuf(ustream); @@ -2952,7 +2938,7 @@ error_put_subbuf: /* Write index if needed. */ if (!write_index) { - goto rotate; + goto end; } if (stream->chan->live_timer_interval && !stream->metadata_flag) { @@ -2987,24 +2973,7 @@ error_put_subbuf: goto error; } -rotate: - /* - * After extracting the packet, we check if the stream is now ready to be - * rotated and perform the action immediately. - */ - rotation_ret = lttng_consumer_stream_is_rotate_ready(stream); - if (rotation_ret == 1) { - rotation_ret = lttng_consumer_rotate_stream(ctx, stream); - if (rotation_ret < 0) { - ERR("Stream rotation error"); - ret = -1; - goto error; - } - } else if (rotation_ret < 0) { - ERR("Checking if stream is ready to rotate"); - ret = -1; - goto error; - } +end: error: return ret; }