sink.text.details: adapt to latest libbabeltrace2 API
This patch makes a `sink.text.details` component write the details of
the following MIP 1 features:
Clock class:
• Namespace
• UID
• Precision if unknown
• Accuracy
• Custom origin (namespace, name, and UID)
Stream class:
• UID
Event class:
• UID
Bit array field class:
• Flags (sorted, like enumeration field class mappings)
Trace:
• Namespace
• UID
The clock class term "offset from origin" is more accurate and modern
than "offset", therefore I'm changing this too and updating existing
expectation files accordingly.
Also, what used to be
Origin is Unix epoch: Yes
with MIP 0 is now the same for any MIP:
Origin: Unix epoch
When the origin is unknown, whatever the MIP version, there's no origin
line (like most missing/empty properties of `sink.text.details`).
Here's a hypothetical MIP-1 clock class output example:
Default clock class:
Namespace: lttng.org,2009
Name: monotonic
UID: boot-id:
7d19f00b-f1c7-49ea-a0a1-
5f1a6a062a29
User attributes:
lttng.org,2009:
tag: provigo
original-index: 4
Description: Monotonic Clock
Frequency (Hz): 1,000,000,000
Precision (cycles): 0
Accuracy (cycles): 1000
Offset from origin (s): 1,564,079,206
Offset from origin (cycles): 484,157,338
Origin:
Namespace: quebec.ca,2017
Name: referendum
UID: 1995
The component only writes UIDs when the `with-uid` parameter is true
(the default). This is analogous to the `with-uuid` parameter. You may
specify both `with-uuid` and `with-uid` parameters: the former only
applies under MIP 0 and the latter under MIP 1.
Also changing some tests which set `with-uuid` to false to also set
`with-uid` to false, should they work under MIP 1.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I2411acb49a878e2eb135af86bc9f618cfd284987
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12757