Make `graph/iterator.{c,h}` use the clock correlation validator
convenience library.
- Replace the fields of `struct bt_message_iterator` that track the
clock expectation state with a single `struct
bt_clock_correlation_validator` field, only present if babeltrace is
built in dev mode.
- Initialize `bt_message_iterator::correlation_validator` in
create_self_component_input_port_message_iterator. Finalize it in
`bt_message_iterator_destroy`.
- Replace the bulk of
`assert_post_dev_clock_classes_are_compatible_one` with one call to
`bt_clock_correlation_validator_validate_message`. If the latter
returns an error, trigger an assertion failure based on the return
error type and associated information.
The modifications in the Makefiles (adding `dummy.cpp`) are to force
linking with the C++ compiler driver. This is necessary, since the
`libbabeltrace2.so` library now requires some symbols from the C++
standard library (e.g. `libstdc++.so`). The `dummy.cpp` does not
actually need to exist. This trick is described in the automake doc
[1].
[1] https://www.gnu.org/software/automake/manual/automake.html#Libtool-Convenience-Libraries
Change-Id: I46a3a553d5e18eb6860d65d928ef33d941e9e951
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11990
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>