lib: remove CTF concepts of packet and event headers
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 11 Dec 2018 22:43:05 +0000 (17:43 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
Packet and event headers are CTF concepts. In CTF 1.8, the fields in
those scopes are reserved for format encoding/decoding purposes, and
everything they mean has its equivalent property in trace IR objects.

I know no tracers producing CTF which put something else than the known
encoding fields in packet and event headers. Everything not related to
the trace format itself goes into context fields (except for a packet's
total and content sizes which are packet context fields), which are
still available as of this patch. This is so true that Mathieu Desnoyers
confirmed that CTF 2 should explicitly disallow anything else than
format-specific fields in header scopes. However, it might be ambiguous
in CTF v1.8.2, and someone somewhere could have put user fields in
there.

Therefore, for the moment, the `ctf` plugin does not copy the values of
packet and event header fields to trace IR fields. This could be done in
the future if we find that it's a limitation: for example, prefix header
fields with `ctf-header-` and put them into appropriate context fields
(packet context for packet header and event common context for event
header).

To make sure the user knows about non-CTF header fields being removed,
the `ctf` plugin prints a warning for each such field, for example:

    12-12 10:53:25.904 21954 21954 W
    PLUGIN-CTF-METADATA-META-WARN-MEANINGLESS-HEADER-FIELDS
    warn_meaningless_field@ctf-meta-warn-meaningless-header-fields.c:32
    User field found in packet header: ignoring: name="allo"

    12-12 10:53:25.904 21954 21954 W
    PLUGIN-CTF-METADATA-META-WARN-MEANINGLESS-HEADER-FIELDS
    warn_meaningless_field@ctf-meta-warn-meaningless-header-fields.c:32
    User field found in event header: ignoring: name="msg_id"

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>

No differences found
This page took 0.02864 seconds and 4 git commands to generate.