ctf.fs source: add trace file rotation (stream instance ID) support
ctf.fs source is changed as such:
* A CTF FS trace owns zero or more stream file groups.
* A stream file group owns a unique CTF IR stream object and one or more
stream file infos.
* A stream file info contains a path and a beginning timestamp (the
beginning timestamp of the stream file's first packet).
* Stream file infos are ordered by time in a stream file group.
* One output port is created for each stream file group. It is also
associated to this stream file group through private port's user data.
The name of the port is always the stream file group's first stream
file info's path, which is always the path of stream file containing
the oldest packet. This can be useful to isolate a group of stream
files by name and possibly CPU ID, e.g. (CPU 1 of LTTng channel
`my-channel`):
--connect='ctf.*my-channel_1_*:mux'
or all CPUs of LTTng channel `hello-chan`:
--connect='ctf.*hello-chan_*:mux'
* The user data of a notification iterator contains its upstream port's
stream file group and a stream file info index.
* For a given notification iterator, one data stream file object (owner
of a binary notification iterator and the one which does the stream
file memory mapping) is always active. When it returns a
BT_NOTIFICATION_ITERATOR_STATUS_END status, the data stream file is
destroyed and the next stream file info is used to create a new data
stream file, from which the real next notification is obtained. If
there's no more stream file info in the stream file group, then
BT_NOTIFICATION_ITERATOR_STATUS_END is returned.
This patch effectively makes a ctf.fs source component create one unique
stream, and thus one port, for each stream instance of each trace,
therefore supporting trace file rotation. Only one stream file is
opened and memory mapped at any time for a given stream instance.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.026999 seconds and 4 git commands to generate.