stream.c: allow stream PC's `events_discarded` field to be set by user
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 29 May 2017 20:15:00 +0000 (16:15 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 20:58:12 +0000 (16:58 -0400)
commit59a09b0ee1d2e2cb8430d10cbea84b789d184e67
treed2a3638e58d6a188f2ab8e3525ed69b8818fab1b
parent4f2b28fbb41c4065f00c86f871d419683400aa6f
stream.c: allow stream PC's `events_discarded` field to be set by user

If a stream packet context `events_discarded` field is set a flush time,
check if its value keeps the count monotonic, and use this value to set
the stream's current discarded events count if so. If it's not set, do
like before and set it automatically from the stream's current count.

This will make it possible for a ctf.fs sink component to write the
original `events_discarded` field without having to read it, compute
the difference with the previous value, and use
bt_ctf_stream_append_discarded_events() to change the stream's discarded
events count.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/stream.c
This page took 0.024964 seconds and 4 git commands to generate.