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 21:03:20 +0000 (16:03 -0500)
commita762ae2070f19a942e12673cf27cf180ab895874
tree523b38abffe56bd18c37694c7e329ba6f25c7b6a
parent2a1637bf0ba1118c1a239121dc9f754d166eb09f
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.025285 seconds and 4 git commands to generate.