Add the concept of a static trace
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 26 Apr 2017 17:18:26 +0000 (13:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:41 +0000 (12:57 -0400)
commit5acf2ae6bdfb2bc6fa88e250a87ccc6ba3546d89
tree38d842ffa07b3b53c4a2e3e84492883575ea661d
parentc1e730febb17c72e96c356d54b8df31d5c0c0b94
Add the concept of a static trace

A static trace is a frozen trace with the additional property that you
cannot call:

* bt_ctf_trace_add_stream_class()
* bt_ctf_trace_add_clock_class()
* bt_ctf_stream_create() with any stream that belongs to the trace

You can make a trace static with bt_ctf_trace_set_is_static(). This is
not a reversible operation. You can check if a trace is static with
bt_ctf_trace_is_static().

This static property can help a sink/filter component determine when the
trace is "finished", in that a static trace guarantees that its streams
are complete and there won't be more. It is up to the filter or sink
component to know when each stream is considered to be ended. The end of
a stream is provided by a notification. For example, a given filter
could receive two streams of a given trace on two different ports. In
this case, when the component gets both "stream end" notifications, and
when their trace is static, it can discard any resource associated with
this trace.

This feature is essential for a CTF writer sink component to put CTF
writer objects which are no longer needed. This is especially true when
working with a ctf.lttng-live source which "never ends": the sink
resources need to be released when it is known that there won't be more
streams for a given trace, otherwise this would be considered a leak.

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