From: Mathieu Desnoyers Date: Thu, 11 May 2017 21:53:58 +0000 (-0400) Subject: Fix: use "flush empty" ioctl for snapshots X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=f22dd89135f6b1749cd75735f04e3cb309da12c1;hp=f22dd89135f6b1749cd75735f04e3cb309da12c1 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 Signed-off-by: Jérémie Galarneau ---