Babeltrace 2 C API  2.0.0
Open-source trace manipulation framework
Modules

Detailed Description

Intermediate representation of tracing domain objects and concepts (contents of messages).

The Babeltrace 2 trace IR (intermediate representation) modules contain everything you need to represent tracing domain concepts and objects so that many components, written by different authors, can exchange trace metadata and data.

The trace IR objects are divided into two main categories:

Metadata

Classes of data objects.

A metadata object describes many data objects.

For example, an event class describes the numeric ID, name, logging level, and classes of payload fields of all the events you create from it.

Metadata objects are one of the most valuable concepts of Babeltrace 2: because they describe the structures of many data objects at once, they enable great space and time optimizations.

For example, a sink component which writes a trace following a metadata-supporting format, such as the Common Trace Format, can serialize the metadata objects once so that the data objects are more compact and take less time to write.

The metadata objects are:

Data

Instances of metadata objects.

For example, a stream is an instance of a stream class.

The data objects are:

The trace IR metadata to data object association is:

Metadata object Data object
Clock class Stream clock (see Clock snapshot)
Event class Event
Field class Field
Stream class Stream
Trace class Trace

Within a trace processing graph, messages carry data objects from component to component.

You need to create metadata objects before you create data objects. You can then use the data objects to create messages.

For example, you need a stream class to create a stream. With a stream, you can create a stream beginning messages, stream end messages, event messages, and other types of messages.

Usually, when you create a data object from a metadata object, the metadata object becomes frozen: you cannot modify it for the rest of its lifetime.

All metadata objects and some data objects have an optional user attributes property (a map value): you can use it to attach custom attributes, without any semantics specified by the Babeltrace 2 project, to those objects.

Modules

 Clock class
 Class of stream clocks.
 
 Clock snapshot
 Snapshot of a stream clock.
 
 Event
 Trace event.
 
 Event class
 Class of events.
 
 Fields
 Containers of trace data.
 
 Field classes
 Classes of fields.
 
 Field path
 Path to a field.
 
 Packet
 Trace packet.
 
 Stream
 Trace stream.
 
 Stream class
 Class of streams.
 
 Trace
 Trace (set of streams).
 
 Trace class
 Class of traces.