sink.text.details: adapt to latest libbabeltrace2 API
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 20 Jun 2023 20:39:16 +0000 (16:39 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commitc01775978d47884b3bde80c70ca219691238b027
tree640f6c4f3eaf0c4a58142f78e87a95d69831c5a4
parentc5d4db7a5b271f013e93540e16998beb01fd677d
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
30 files changed:
src/plugins/text/details/details.c
src/plugins/text/details/details.h
src/plugins/text/details/write.c
tests/data/plugins/flt.lttng-utils.debug-info/trace-debug-info.expect
tests/data/plugins/flt.utils.muxer/succeed/diff-inactivity-msg-cs.expect
tests/data/plugins/sink.ctf.fs/succeed/trace-double.expect
tests/data/plugins/sink.ctf.fs/succeed/trace-float.expect
tests/data/plugins/sink.text.details/succeed/default-compact-without-time.expect
tests/data/plugins/sink.text.details/succeed/default-compact.expect
tests/data/plugins/sink.text.details/succeed/default-without-data.expect
tests/data/plugins/sink.text.details/succeed/default-without-names.expect
tests/data/plugins/sink.text.details/succeed/default-without-time.expect
tests/data/plugins/sink.text.details/succeed/default-without-trace-name.expect
tests/data/plugins/sink.text.details/succeed/default-without-uuid.expect
tests/data/plugins/sink.text.details/succeed/default.expect
tests/data/plugins/src.ctf.fs/succeed/trace-2packets-barectf-event-before-packet.expect
tests/data/plugins/src.ctf.fs/succeed/trace-2packets.expect
tests/data/plugins/src.ctf.fs/succeed/trace-barectf-event-before-packet.expect
tests/data/plugins/src.ctf.fs/succeed/trace-lttng-tracefile-rotation.expect
tests/data/plugins/src.ctf.fs/succeed/trace-session-rotation.expect
tests/data/plugins/src.ctf.fs/succeed/trace-simple.expect
tests/data/plugins/src.ctf.lttng-live/cli-base.expect
tests/data/plugins/src.ctf.lttng-live/cli-multi-domains.expect
tests/data/plugins/src.ctf.lttng-live/inactivity-discarded-packet.expect
tests/data/plugins/src.ctf.lttng-live/new-streams.expect
tests/data/plugins/src.ctf.lttng-live/split-metadata.expect
tests/data/plugins/src.ctf.lttng-live/stored-values.expect
tests/plugins/flt.lttng-utils.debug-info/test-succeed.sh
tests/plugins/sink.ctf.fs/succeed/test-succeed.sh
tests/plugins/src.ctf.fs/succeed/test-succeed.sh
This page took 0.027457 seconds and 4 git commands to generate.