Automatically generate discarded packets/events notifications
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 22 Jun 2017 15:20:29 +0000 (11:20 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Jul 2017 21:26:38 +0000 (17:26 -0400)
commitb04a393b728e182ac31ff0b4c8f8cd657f620f65
tree118c98bbbe553216035c6e057395a8cfcded0a30
parent30efcd276335bea27cd24268362aff2cfb9d11d0
Automatically generate discarded packets/events notifications

This patch adds discarded packets and events notifications. Those
notifications are automatically generated by each notification iterator
by looking at packet header (PH) field's `packet_seq_num` and packet
context (PC) field's `events_discarded` fields to keep track of the
current state. Automatically generating those notifications, and
forbidding the user to create them, allows them to always be
synchronized with the values of the PH and PC special fields, and
guarantees to the user that they are generated whenever there is a
change in those values.

Each notification contains a count, an optional beginning clock value,
and an optional ending clock value, as well as a stream in which the
elements are discarded by the tracer.

As of this patch, flt.utils.trimmer does not reset the value of its
copied `packet_seq_num` and `events_discarded` fields to 0, and this is
probably a bug because a notification iterator on an flt.utils.trimmer
component can see discarded packets or events notifications before the
first packet beginning notification (which should not be the case if we
consider that a trimmed stream should act like a stream which originally
had those time bounds).

The sink.text.pretty component does not do anything specific with those
new notifications yet, but they are expected to be used to replicate
Babeltrace 1's behaviour (printing warnings).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
13 files changed:
include/Makefile.am
include/babeltrace/babeltrace.h
include/babeltrace/graph/notification-discarded-elements-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-discarded-events.h [new file with mode: 0644]
include/babeltrace/graph/notification-discarded-packets.h [new file with mode: 0644]
include/babeltrace/graph/notification-internal.h
include/babeltrace/graph/notification-iterator-internal.h
include/babeltrace/graph/notification.h
lib/graph/iterator.c
lib/graph/notification/Makefile.am
lib/graph/notification/discarded-elements.c [new file with mode: 0644]
lib/graph/notification/discarded-events.c [new file with mode: 0644]
lib/graph/notification/discarded-packets.c [new file with mode: 0644]
This page took 0.025563 seconds and 4 git commands to generate.