graph/mip: make bt_get_greatest_operative_mip_version compute operative MIP version
bt_get_greatest_operative_mip_version is currently implemented assuming
that the only existing MIP version is 0. It only checks that all
component descriptors support version 0, and then returns 0 as the
computed operative MIP version.
Since the library now supports MIP versions 0 and 1,
bt_get_greatest_operative_mip_version needs to actually compute the
greatest commonly supported version. Implement something that will work
for any number of MIP versions.
Change validate_operative_mip_version_in_array to
get_supported_mip_version_ranges, make it is solely reponsible for
calling the component class' get_supported_mip_versions method and
append the resulting range set to the `supported_ranges` array. Or, if
the component class doesn't implement that method, append a range set
with only `[0, 0]`.
Once this is done, we have an array with range sets representing the
supported MIP versions for each soon-to-be component. Compute (in the
new function find_greatest_compatible_mip_version) the greatest commonly
supported version, if any.
Change-Id: Ief0fe9d3323b4e150fa08282531b55ef15be75cf
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7579
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7572
This page took 0.024885 seconds and 4 git commands to generate.