Add `ctf::src::MetadataStreamParser` abstract base class
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 25 Oct 2023 15:41:53 +0000 (15:41 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commit8bb4ee66770f1f182f4d7e34a3ac8804633c42bd
tree3e564845531c91f8634af8615bb49e8382a5dac7
parent9629f01d64091c1cff68eb3dd8b1f8bc8399c51d
Add `ctf::src::MetadataStreamParser` abstract base class

This is an abstract base class for any metadata stream parser.

Parse a metadata stream section with parseSection() (defers to the
virtual _parseSection() method).

Get the resulting, current trace class and metadata stream UUID with
traceCls() and metadataStreamUuid().

The constructor accepts an optional self component pointer so that
parseSection() may finalize the trace class after calling the
version-specific _parseSection().

The trace class finalization method finalizes a `ctf::src` CTF IR trace
class after its creation or when it gets new data stream classes or
event record classes. The method:

• Sets the value saving indexes of dependencies (field classes) and the
  saved value index of dependent (dynamic-length, optional, and variant)
  field classes.

  It also links the dependent field classes to their dependencies by
  weak pointer.

• Reconfigures the clock classes of the trace class.

• Normalizes the offsets of the clock classes of the trace class so that
  the cycle part is less than the frequency.

• With a self component pointer, translates the contained objects to
  their trace IR equivalents.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: I24e175447f759220de5943ccb49c7888a5934ce5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12733
src/Makefile.am
src/plugins/ctf/common/src/metadata/metadata-stream-parser.cpp [new file with mode: 0644]
src/plugins/ctf/common/src/metadata/metadata-stream-parser.hpp [new file with mode: 0644]
This page took 0.024166 seconds and 4 git commands to generate.