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:28:18 +0000 (12:28 -0400)
commit6b1463e62b1281c335123beb0b0894bdbff8f90c
treed035adc3aeac4c1c456337bfd72afe164210f06a
parent969f43d2990f7d176f6a23e412ef191138c066da
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.02456 seconds and 4 git commands to generate.