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 20:17:53 +0000 (16:17 -0400)
commit2ec84d269adb6770ff512a8943e020bd9e9f9ffb
tree73f1c33f0f96d2a3509b5521f9fbea72ac556609
parent708ab211381d2eb51ea78ca2af6b61ebee7c6bd9
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.025932 seconds and 4 git commands to generate.