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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:38 +0000 (18:19 -0400)
commit96a0a69d225662aa1aec5cdba468c0810eaeb8c5
treef3cecff235df1c20876786370fa8ed3651a844c0
parent224b271187e930d9a01df1397c927d31cfd82bd7
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.025623 seconds and 4 git commands to generate.