Fix: handle negative clock offset for lttng-ust metadata
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Feb 2016 22:13:25 +0000 (17:13 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 11 Feb 2016 20:42:56 +0000 (15:42 -0500)
commitdc113ec73c678a64d75b70297c042f8cbde3d2a1
treecd2bcc34067a77753b722e545edb360efc3894fe
parentd1e2f4ebd1c8894756d7a595593055883962b58f
Fix: handle negative clock offset for lttng-ust metadata

In the unlikely situation where a system sets its hardware clock
(CLOCK_REALTIME) to 0 (Epoch) after boot, the difference

  monotonic - realtime

becomes negative.

Fixup this situation by returning a 0 offset in this case.

This ensures that trace viewer implementations (e.g. babeltrace) which
currently cannot handle the negative offset (known bug) still work with
the generated traces.

This patch should be applied to master and stable-2.7.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-metadata.c
This page took 0.025372 seconds and 4 git commands to generate.