lib: remove "unknown clock snapshot" concept
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 31 May 2019 12:33:14 +0000 (08:33 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 31 May 2019 14:48:02 +0000 (10:48 -0400)
commit0cbc2c3316814e4b4bf3fd3ba3b361b165949e95
tree51d9e893fa69a860428ae0ae57326addc83b0487
parent2f16a6a228d0059349b8566979c9d579e7e271b3
lib: remove "unknown clock snapshot" concept

The team decided that, because this "unknown clock snapshot" feature has
no current use case and that CTF 1.8 cannot use it, we can wait until we
really need it to implement it.

The feature was only partially implemented: you could know that a given
clock snapshot is unknown, but you could not make one unknown. This
asymmetry was so that current consumers (filters and sinks) could
support unknown clock snapshots without taking the development time to
make the producers (sources and filters) create them. This is another
proof that the feature is not needed now.

In the library, all bt_*_borrow_*_clock_snapshot() functions, except for
bt_message_stream_activity_beginning_borrow_default_clock_snapshot_const()
and
bt_message_stream_activity_end_borrow_default_clock_snapshot_const(),
now return the borrowed clock snapshot object instead of returning a
clock snapshot status (known or unknown). Python bindings and plugins
are adapted accordingly.

The `BT_MESSAGE_STREAM_ACTIVITY_CLOCK_SNAPSHOT_STATE_UNKNOWN` state
still exists for stream activity messages because it can be useful to
set that the first stream activity beginning or the last stream activity
end is unknown. `src.ctf.fs` is one user of this state.

Also, the bt_stream_class_default_clock_is_always_known() function is
removed because the default clock is always known. This function
unconditionally returned `BT_TRUE` anyway. Python bindings and plugins
are adapted accordingly.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I2665f713917b14efdecb181bef16c199ddd9eb81
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1358
Tested-by: jenkins
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
26 files changed:
bindings/python/bt2/bt2/native_bt_clock_snapshot.i
bindings/python/bt2/bt2/native_bt_message.i
bindings/python/bt2/bt2/native_bt_stream_class.i
include/babeltrace/graph/message-discarded-events-const.h
include/babeltrace/graph/message-discarded-packets-const.h
include/babeltrace/graph/message-event-const.h
include/babeltrace/graph/message-message-iterator-inactivity-const.h
include/babeltrace/graph/message-packet-beginning-const.h
include/babeltrace/graph/message-packet-end-const.h
include/babeltrace/graph/message-stream-beginning-const.h
include/babeltrace/graph/message-stream-end-const.h
include/babeltrace/trace-ir/clock-snapshot-const.h
include/babeltrace/trace-ir/stream-class-const.h
lib/graph/message/discarded-items.c
lib/graph/message/event.c
lib/graph/message/message-iterator-inactivity.c
lib/graph/message/packet.c
lib/trace-ir/stream-class.c
plugins/ctf/fs-sink/fs-sink.c
plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c
plugins/ctf/lttng-live/lttng-live.c
plugins/lttng-utils/debug-info/debug-info.c
plugins/lttng-utils/debug-info/trace-ir-mapping.c
plugins/text/pretty/print.c
plugins/utils/muxer/muxer.c
plugins/utils/trimmer/trimmer.c
This page took 0.027046 seconds and 4 git commands to generate.