YAML data stream type object
A data stream type object is the type of a data stream.
A data stream type describes everything a CTF consumer needs to decode its instances (data streams).
Data stream type objects are only found under the
data-stream-types
property of a
trace type object.
Properties
Name | Type | Description | Req? | Default |
---|---|---|---|---|
Boolean |
If this property is true, then this data stream type is its trace type's default data stream type. For a generated tracing function For a given trace type object, a single data stream type object can have this property set to true. See also the code generation header option object’s
|
No |
False |
|
String |
Name of the clock type which describes the default clock of this data stream type’s instances. This property’s value must be an existing key within this trace type’s
When a data stream type has a default clock type, all its instances (data streams) have their own default clock. A data stream clock is an integral counter of cycles. With the clock’s type’s frequency and type’s offset properties, you can convert a clock value to seconds from its origin. The header fields of CTF packets and event records can contain snapshots, named timestamps, of the value of their data stream’s default clock. |
No |
No default clock type |
|
|
Features of this data stream type’s instances. |
No |
See Features object for default values. |
|
Type of the structure field type object’s
|
Extra, user-defined members to be appended to this data stream type’s packet context structure field type. For each member name Member names must be valid TSDL identifiers. |
No |
No packet context field type extra members |
|
Structure field type object or string |
Event record common context field type of this data stream type. If this property’s value is a string, it must be the name of an existing field type alias. For each member Member names must be valid TSDL identifiers. |
No |
No event record common context field type |
|
Mapping of string keys to event record type objects |
Event record types of this data stream type. Keys of this mapping are event record type names. They must be valid C identifiers. This mapping must contain at least one entry. |
Yes |
||
Sequence of strings. |
No |
No inclusions |
Features object
The features of a data stream type object.
Properties
All the properties are optional.
Name | Type | Description | Default |
---|---|---|---|
|
Features related to CTF packets. |
See Packet features object for default values. |
|
|
Features related to CTF event records. |
See Event record features object for default values. |
Packet features object
The packet features of a data stream type object.
As of barectf 3.0, each feature controls whether or not some information will be part of the context of each CTF packet which the generated tracer produces.
You can enable or disable a feature. When you enable one, you can set its field type explicitly or make barectf choose a sane default.
Properties
For all the feature properties below, if the value is a boolean:
- True
-
Make barectf use a default field type.
- False
-
Disable the feature (if possible).
All the properties are optional.
Name | Type | Description | Default |
---|---|---|---|
Unsigned integer field type object, string, or boolean |
Type of packet context’s total size field. If this property’s value is a string, it must be the name of an existing field type alias. The size of this feature’s integer field type must be greater than or
equal to the size of the You can’t disable this feature. |
Use a default field type (true) |
|
Unsigned integer field type object, string, or boolean |
Type of packet context’s content size field. If this property’s value is a string, it must be the name of an existing field type alias. The size of this feature’s integer field type must be less than or equal
to the size of the You can’t disable this feature. |
Use a default field type (true) |
|
Unsigned integer field type object, string, or boolean |
Type of packet context’s beginning timestamp field. If this property’s value is a string, it must be the name of an existing field type alias. |
Use a default field type (true) if this data stream type has a default clock type, or false otherwise |
|
Unsigned integer field type object, string, or boolean |
Type of packet context’s end timestamp field. If this property’s value is a string, it must be the name of an existing field type alias. |
Use a default field type (true) if this data stream type has a default clock type, or false otherwise |
|
Unsigned integer field type object, string, or boolean |
Type of packet context’s discarded event record counter snapshot field. If this property’s value is a string, it must be the name of an existing field type alias. |
Use a default field type (true) |
Event record features object
The event records features of a data stream type object.
As of barectf 3.0, each feature controls whether or not some information will be part of the header of each CTF event record which the generated tracer produces.
You can enable or disable a feature. When you enable one, you can set its field type explicitly or make barectf choose a sane default.
Properties
For all the feature properties below, if the value is a boolean:
- True
-
Make barectf use a default field type.
- False
-
Disable the feature.
All the properties are optional.
Name | Type | Description | Default |
---|---|---|---|
Unsigned integer field type object, string, or boolean |
Type of event header’s event record type ID field. If this property’s value is a string, it must be the name of an existing field type alias. This feature is required when this data stream type has more than one
event record type ( |
Use a default field type (true) |
|
Unsigned integer field type object, string, or boolean |
Type of event header’s timestamp field. If this property’s value is a string, it must be the name of an existing field type alias. |
Use a default field type (true) if this data stream type has a default clock type, or false otherwise |
Examples
The following examples can omit event record type objects for clarity. |
event-record-types:
# ...
$is-default: true
event-record-types:
# ...
$default-clock-type-name: sys_clock2
event-record-types:
# ...
$features:
packet:
discarded-event-records-counter-snapshot-field-type: false
event-record-types:
# ...
$features:
packet:
total-size-field-type: uint16
content-size-field-type: uint16
event-record-types:
# ...
$features:
event-record:
timestamp-field-type: false
event-record-types:
# ...
packet-context-field-type-extra-members:
- cur_load: int8
- node_id: uint16
- node_addr: string
event-record-types:
# ...
event-record-common-context-field-type:
class: structure
members:
- pid: uint32
- level: double
event-record-types:
# ...
event-record-types:
# ...
$include:
- project-b-event-record-types.yaml
- common-data-stream-type-features.yaml