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 15:02:13 +0000 (11:02 -0400)
commite49273dcf0cc67623cea694916c753ebb4272193
treee670b4df40098dabe974cda55527ff7a79a3ed3d
parent7881b1c495675c9b0f9df93fbaeff6cf49310f2a
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.025789 seconds and 4 git commands to generate.