[lttng-dev] [lttng-tools PATCH] Add new thread in consumer for metadata handling

Gerlando Falauto gerlando.falauto at keymile.com
Tue Sep 18 04:59:45 EDT 2012


Hi David,

On 09/11/2012 08:49 PM, David Goulet wrote:
> To prioritize the consumption of the metadata, this patch introduce a
> new thread in the consumer which exclusively handles metadata in order
> to separate them from the trace data.
[...]
> +			/* Check the metadata pipe for incoming metadata. */
> +			if (pollfd == ctx->consumer_metadata_pipe[0]) {
> +				if (revents&  (LPOLLERR | LPOLLHUP | LPOLLNVAL)) {
> +					DBG("Metadata thread pipe hung up");
> +					/*
> +					 * Remove the pipe from the poll set and continue the loop

Since we don't HAVE_EPOLL, we get:

consumer.c: In function 'lttng_consumer_thread_poll_metadata':
consumer.c:1700:42: error: 'LPOLLNVAL' undeclared (first use in this 
function)
consumer.c:1700:42: note: each undeclared identifier is reported only 
once for each function it appears in

For some reason, compat/poll.h defines:
        LPOLLERR = POLLERR,
        LPOLLHUP = POLLHUP | POLLNVAL,
        /* Close on exec feature does not exist for poll(2) */
        LTTNG_CLOEXEC = 0xdead,

Whereas with HAVE_EPOLL we have:
        LPOLLHUP = EPOLLHUP,
        LPOLLNVAL = EPOLLHUP,
        LPOLLRDHUP = EPOLLRDHUP,

I would patch this myself but I'm a bit confused by the above...

Thanks!
Gerlando



More information about the lttng-dev mailing list