lib: add default clock snapshot property to packet beginning/end message
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 18 Feb 2019 23:01:02 +0000 (18:01 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
commita6d85d2fba4fb0ee4253441c7d49dfe3378c07bf
tree2c233aedc7e401e045741e530ecdba765dc22e71
parent8b5bd70c70d589d7a940f0a3ac195bf831e61c36
lib: add default clock snapshot property to packet beginning/end message

Packet beginning/end clock snapshot properties were removed from the
`bt_packet` object in a previous commit because they were considered
redundant with the time ranges given by the recently added discarded
events/packets messages.

Now it seems that those properties are needed in order for a message
iterator such as `flt.utils.trimmer` to know whether or not a given
packet beginning/end message is within a given time range. This removes
uncertainty for a class of filters and sinks.

The CTF format has a concept of packet with a specific end time in its
context, but not all source formats have this chance. For this reason,
instead of putting the beginning and end clock snapshot properties in
the `bt_packet` object itself, which would require any source to know
its packet's end time in advance, the packet beginning/end message
itself contains the property. For example, in this patch,
`src.text.dmesg` is modified to set the first event's clock snapshot as
the single packet beginning message's clock snapshot, and the last
event's clock snapshot as the single packet end message's clock
snapshot. Similar sources should take this approach, as those fields are
mandatory if the message's packet's stream's class has a registered
default clock class.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
include/babeltrace/graph/message-packet-beginning-const.h
include/babeltrace/graph/message-packet-beginning.h
include/babeltrace/graph/message-packet-end-const.h
include/babeltrace/graph/message-packet-end.h
include/babeltrace/graph/message-packet-internal.h
lib/graph/message/packet.c
plugins/ctf/common/msg-iter/msg-iter.c
plugins/text/dmesg/dmesg.c
This page took 0.025177 seconds and 4 git commands to generate.