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:48:09 +0000 (16:48 -0500)
commitdcb93448766003b5d8d19a57e2dd44efa8ea0035
tree52b364e25fe81cd4d80e5199aed59ffb8ed7d6a1
parentb6c748351c94ab57bae3819fc5e2da807f306a7a
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.025239 seconds and 4 git commands to generate.