Fix: source.ctf.lttng-live: muxing failure on clear (unit conversion)
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 16 Jul 2020 20:09:53 +0000 (16:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jul 2020 16:23:43 +0000 (12:23 -0400)
commit6488b1761f590b751acbdef8f5918f97ac52bc4b
treee359ac049c4f8875dd15dcc228c916ff437f20bb
parent6567934701fb3446f1ef943aaa8f24844c81bfdc
Fix: source.ctf.lttng-live: muxing failure on clear (unit conversion)

This commit is a follow-up fix for 8ec4d5ff (see original message).
The original fix included a bogus comparison of:
  `stream_iter->last_inactivity_ts > curr_msg_ts_ns`

While the idea behind the fix is valid, this statement compares
nanoseconds since Unix Epoch (former) to clock cycles (latter).

A conversion of the `last_inactivity_ts` to nanoseconds since Unix epoch
is performed using the stream's default clock class allowing a
comparison in a common time base to take place.

The diff looks more intimidating than it really is as it shifts the
indentation of a lot of code at once. This is because we only want to
perform the timestamp conversion when necessary (very rarely) on this
fairly hot path.

Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ibdc365fec4685da88ae141383d5e5ef0af169a87
src/plugins/ctf/lttng-live/lttng-live.c
This page took 0.024142 seconds and 4 git commands to generate.