From: Mathieu Desnoyers Date: Mon, 8 Feb 2016 21:38:46 +0000 (-0500) Subject: Fix: handle negative clock offset X-Git-Tag: v2.8.0-rc1~35 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=dcb93448766003b5d8d19a57e2dd44efa8ea0035;hp=dcb93448766003b5d8d19a57e2dd44efa8ea0035;p=lttng-modules.git 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 ---