Fix: use "flush empty" ioctl for snapshots
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 May 2017 21:53:58 +0000 (17:53 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 May 2017 10:45:36 +0000 (06:45 -0400)
commit612b8ed86aab0cd7549a433c50ecc9e999227077
treee9815d6e443dfefcd130588dd21fc78415bb3f10
parentb7fa98e6ecaefea815ae0a41b9b97353dd17de8a
Fix: use "flush empty" ioctl for snapshots

When the flush empty ioctl is available, use it to produce an empty
packet at the end of the snapshot, which ensures the stream intersection
feature works.

If this specific ioctl is not available, fallback on the "flush" ioctl,
which does not produce empty packets.

In that situation, there were two prior behaviors possible for
lttng-modules: earlier versions implement a "snapshot" command which
does not perform an implicit "flush_empty". In that case, the stream
intersection feature may not be reliable. In more recent lttng-modules
versions (included stable branch) which did not implement the
flush_empty ioctl, the snapshot ioctl implicitly performed a
flush_empty, which makes the stream intersection feature work, but has
side-effects on the snapshot ioctl performed by the live timer (produces
a stream of empty packets in live mode).

[ Please apply to master, 2.10, 2.9, 2.8 branches. ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/kernel-consumer/kernel-consumer.c
src/common/kernel-ctl/kernel-ctl.c
src/common/kernel-ctl/kernel-ctl.h
src/common/kernel-ctl/kernel-ioctl.h
This page took 0.029082 seconds and 5 git commands to generate.