flt.utils.muxer: validate clock classes on stream beginning messages
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sun, 24 Mar 2019 22:56:48 +0000 (18:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:38 +0000 (18:19 -0400)
commit37911c116dab4c63051996656ee0d5294e1c3609
tree9c79019392c78fd0e972fdd027d68eabbd09a99d
parentf433d1bfa7624c7a185f6a2ff843911a1f4cefab
flt.utils.muxer: validate clock classes on stream beginning messages

This patch makes the clock class validation occur only when getting a
stream beginning message or a message iterator inactivity message.

Because the library guarantees that we always get a stream beginning
message before getting any other message for the same stream, and
because a stream class needs a default clock class for an
`flt.utils.muxer` message iterator to work, we can do the validation a
single time at the beginning of a given stream. This is instead of
checking this for every single message.

This patch also does the "stream's default clock is always known"
validation at the same location (stream beginning message) instead of
checking the clock snapshot state for every message.

I'm adding the `MUXER_MSG_ITER_CLOCK_CLASS_EXPECTATION_NONE` clock class
expectation type which is used when the first stream-associated message
has a stream with no default clock. This is possible with a single
upstream message iterator which provides messages with a single stream
of which the class has no default clock class.

The outcome is less function calls, and I can consistently measure an
approximate 6% performance improvement when reading a typical
four-stream, 1.4-GiB CTF trace created by LTTng.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
plugins/utils/muxer/muxer.c
This page took 0.023769 seconds and 4 git commands to generate.