Fix: remove bad check after epoll wait in consumer
authorDavid Goulet <dgoulet@efficios.com>
Thu, 29 Aug 2013 14:38:12 +0000 (10:38 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 29 Aug 2013 14:50:26 +0000 (10:50 -0400)
The returned nb_fd value is the number of FD ready for the requested I/O
so having and revents set to 0 is possible since not all fd are ready
thus making this check irrelevant and actually ressource consuming.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c

index 786a1db7bd93b41ef36f27a978c424d1b434aeaf..256c57a736c3044844be5733c84c92f95f16c47b 100644 (file)
@@ -2231,11 +2231,6 @@ restart:
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
-                       /* Just don't waste time if no returned events for the fd */
-                       if (!revents) {
-                               continue;
-                       }
-
                        if (pollfd == lttng_pipe_get_readfd(ctx->consumer_metadata_pipe)) {
                                if (revents & (LPOLLERR | LPOLLHUP )) {
                                        DBG("Metadata thread pipe hung up");
This page took 0.029874 seconds and 4 git commands to generate.