Fix: handle negative clock offset
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Feb 2016 21:38:46 +0000 (16:38 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Feb 2016 21:49:42 +0000 (16:49 -0500)
commit2b644192779b07e8de2285ff5f68903c6c70597f
tree7805ddcac0f3f4540b7c0e44bce9851f0453e0d9
parent5de001051fd7d22d35d33496f677a552b0dc8883
Fix: handle negative clock offset

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.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c
This page took 0.025649 seconds and 4 git commands to generate.