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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:09:19 +0000 (00:09 -0400)
commit96b32819b17ba92220e7c55307a5b7a6391833ed
treef80c243718ce5bc355e4eb2c0676f7bca6754dd1
parent12ecd11ac739264b9cce24cce3118f1942ea3858
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.023378 seconds and 5 git commands to generate.