dynamic-type: remove underscore prefix from mapping names
Dynamic types are expressed by LTTng-UST as a variant + its tag.
Currenly (v2.13 and older), the names of the variant's choices and the
enumeration's entries do not match: enumeration entry names are prefixed
with an underscore.
This worked with older versions of LTTng-tools since all fields in the
TSDL metadata were "escaped" by prepending an underscore, causing the
variant choices to match the enumeration mapping names.
Following a rewrite of the TSDL producer, that no longer systematically
prepends an underscore, I noticed this discrepancy.
Newer LTTng-tools versions using the v10 protocol will assume that a
variant field's choices matches its tag's mapping names exactly, while a
work-around for older supported versions (8 and 9) will strip the
leading underscores from the enumeration mapping names when this
specified combination is found.
Note that the "oldest compatible" version remains unchanged as this
change is not ABI breaking.
There is one scenario where this fix can cause problem: running an older
LTTng-tools (e.g. 2.13) linked against a recent LTTng-UST (2.14+). This
configuration is _not_ supported and versions are properly checked at
build time by LTTng-tools.
In that problematic case, the older LTTng-tools would expect the
enumeration mappings to be prefixed with an underscore and produce an
invalid CTF trace.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ia7e78096a9c31cd4c0574d599c961067d8f03791
This page took 0.024943 seconds and 4 git commands to generate.