From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [BABELTRACE PATCH 3/3] Handle empty streams on iterator init
Date: Wed, 27 Nov 2013 17:41:25 +0000 (UTC) [thread overview]
Message-ID: <24722733.76810.1385574085881.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1385570412-31370-3-git-send-email-jdesfossez@efficios.com>
All 3 patches merged, thanks!
Mathieu
----- Original Message -----
> From: "Julien Desfossez" <jdesfossez@efficios.com>
> To: "mathieu desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org, "Julien Desfossez" <jdesfossez at efficios.com>
> Sent: Wednesday, November 27, 2013 11:40:12 AM
> Subject: [BABELTRACE PATCH 3/3] Handle empty streams on iterator init
>
> In live trace streaming, we can create an iterator with inactive
> streams. This patch allows inactive streams to be considered as valid.
>
> Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>
> ---
> lib/iterator.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/lib/iterator.c b/lib/iterator.c
> index 155fcbe..3280f4a 100644
> --- a/lib/iterator.c
> +++ b/lib/iterator.c
> @@ -725,7 +725,7 @@ int bt_iter_init(struct bt_iter *iter,
> if (ret == EOF) {
> ret = 0;
> continue;
> - } else if (ret) {
> + } else if (ret != 0 && ret != EAGAIN) {
> goto error;
> }
> /* Add to heap */
> @@ -821,6 +821,13 @@ reinsert:
> removed = bt_heap_replace_max(iter->stream_heap, file_stream);
> assert(removed == file_stream);
>
> + file_stream = bt_heap_maximum(iter->stream_heap);
> + if (file_stream->pos.content_size == 0) {
> + ret = EAGAIN;
> + } else {
> + ret = 0;
> + }
> +
> end:
> return ret;
> }
> --
> 1.8.3.2
>
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2013-11-27 17:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 16:40 [lttng-dev] [BABELTRACE PATCH 1/3] Handle the inactive streams Julien Desfossez
2013-11-27 16:40 ` [lttng-dev] [BABELTRACE PATCH 2/3] Handle packets containing only a header Julien Desfossez
2013-11-27 16:40 ` [lttng-dev] [BABELTRACE PATCH 3/3] Handle empty streams on iterator init Julien Desfossez
2013-11-27 17:41 ` Mathieu Desnoyers [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-27 15:06 [lttng-dev] [BABELTRACE PATCH 1/3] Handle the inactive streams Julien Desfossez
2013-11-27 15:06 ` [lttng-dev] [BABELTRACE PATCH 3/3] Handle empty streams on iterator init Julien Desfossez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24722733.76810.1385574085881.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox