barectf: add support for packet sequence number
authorJon Lamb <jon@auxon.io>
Fri, 4 Mar 2022 15:19:12 +0000 (07:19 -0800)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Mar 2022 12:56:51 +0000 (07:56 -0500)
commitaf09c4fca422e9c4e2b48c45e3e966a848afabc5
treeb72924856abed917c40ba81406c661b127bd8553
parentcca624344899da9b1bad969e4f344ac1ea107621
barectf: add support for packet sequence number

Adds a new optional packet features object `sequence-number-field-type`,
which generates the metadata field type name `packet_seq_num` when
defined (defaults to false).

Currently this is conditionally maintained in `struct barectf_ctx` as a
`uint32_t` type like `events_discarded`.

In the future this could be improved to use the config type defined by
the stream in `struct barectf_default_ctx` so that the types are
aligned.

[Philippe Proulx: add documentation to Jon's patch.]

Refs: https://github.com/efficios/barectf/pull/24
Closes: https://github.com/efficios/barectf/issues/23
Signed-off-by: Jon Lamb <jon@auxon.io>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ibfa9e4ab73a7c338e41377aae01d498dee62086b
15 files changed:
barectf/cgen.py
barectf/config.py
barectf/config_parse_v3.py
barectf/schemas/config/3/config-pre-field-type-expansion.yaml
barectf/schemas/config/3/config.yaml
barectf/templates/c/barectf.c.j2
barectf/templates/c/barectf.h.j2
barectf/templates/c/serialize-write-seq-num-statements.j2 [new file with mode: 0644]
docs/modules/how-barectf-works/pages/ctf-primer.adoc
docs/modules/platform/pages/api.adoc
docs/modules/yaml/pages/dst-obj.adoc
tests/tracing/configs/counter-clock/dst-packet-features/seq-num.yaml [new file with mode: 0644]
tests/tracing/expect/counter-clock/dst-packet-features/seq-num.data.expect [new file with mode: 0644]
tests/tracing/expect/counter-clock/dst-packet-features/seq-num.metadata.expect [new file with mode: 0644]
tests/tracing/src/counter-clock/dst-packet-features/seq-num.c [new file with mode: 0644]
This page took 0.026118 seconds and 4 git commands to generate.