Test for new metadata at each packet
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 12 Sep 2013 15:04:22 +0000 (11:04 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 27 Sep 2013 17:57:14 +0000 (13:57 -0400)
commit94d4914075c61cd1ee2ec00d8b61eacff105fc47
tree5d09cc19cdd4f5e11257bcc1355f14b97533513d
parentd3e2ba59faddb31870e2ce29b6a881f7ad5ad883
Test for new metadata at each packet

After sending each data packet in live, we need to check if new metadata
is available before sending the index informing the viewer it can read
the trace.

Since the data and the metadata are handled by two different threads,
this patch introduces a rendez-vous point: if new metadata is available,
the data thread flushes the metadata stream and waits on a conditionnal
variable. When the metadata thread finishes to send its data, it wakes
up the data thread which can send its index.

That way, the viewer is informed new metadata is available before
attempting to read a packet that might require an update of the
metadata.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c
src/common/consumer-stream.c
src/common/consumer-stream.h
src/common/consumer-timer.c
src/common/consumer.c
src/common/consumer.h
src/common/kernel-consumer/kernel-consumer.c
src/common/kernel-consumer/kernel-consumer.h
src/common/ust-consumer/ust-consumer.c
src/common/ust-consumer/ust-consumer.h
This page took 0.026862 seconds and 4 git commands to generate.