X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-field-convert.hpp;h=c0e663983267c2315c0dcc6e0c2a921b8c7beff4;hb=5c7248cd5bce45bf64d563fb4e130a63bf345f11;hp=f570e65ed843726c88e604d8078478f36118a83e;hpb=d7bfb9b0fa35679d3e728b9165699d9faf905539;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-field-convert.hpp b/src/bin/lttng-sessiond/ust-field-convert.hpp index f570e65ed..c0e663983 100644 --- a/src/bin/lttng-sessiond/ust-field-convert.hpp +++ b/src/bin/lttng-sessiond/ust-field-convert.hpp @@ -10,18 +10,44 @@ #include "field.hpp" #include "ust-registry.hpp" +#include "ust-registry-session.hpp" #include #include +#include namespace lttng { namespace sessiond { namespace ust { +enum class ctl_field_quirks : unsigned int { + NONE = 0, + /* + * LTTng-UST with ABI major version <= 9 express variants with a tag + * enumeration that doesn't match the fields of the variant. The + * tag's mapping names are systematically prefixed with an underscore. + */ + UNDERSCORE_PREFIXED_VARIANT_TAG_MAPPINGS = 1 << 0, +}; + +inline ctl_field_quirks operator&(ctl_field_quirks lhs, ctl_field_quirks rhs) +{ + using enum_type = std::underlying_type::type; + return ctl_field_quirks(static_cast(lhs) & static_cast(rhs)); +} + +inline ctl_field_quirks operator|(ctl_field_quirks lhs, ctl_field_quirks rhs) +{ + using enum_type = std::underlying_type::type; + return ctl_field_quirks(static_cast(lhs) | static_cast(rhs)); +} + std::vector create_trace_fields_from_ust_ctl_fields( - const ust_registry_session& session, + const lttng::sessiond::ust::registry_session& session, const lttng_ust_ctl_field *fields, - std::size_t field_count); + std::size_t field_count, + trace::field_location::root lookup_root, + ctl_field_quirks quirks = ctl_field_quirks::NONE); } /* namespace ust */ } /* namespace sessiond */