Fix typos
[ctf.git] / common-trace-format-specification.txt
index 4af2244ab37adfa5a513cff029811cbdcc48bcea..5568a270513c18dac05a83148245155323c64f1d 100644 (file)
@@ -214,8 +214,9 @@ size (8-bit) correspond to the C99 standard integers. In addition,
 integers with alignment and/or size that are _not_ a multiple of the
 byte size are permitted; these correspond to the C99 standard bitfields,
 with the added specification that the CTF integer bitfields have a fixed
-binary representation. A MIT-licensed reference implementation of the
-CTF portable bitfields is available at:
+binary representation. Integer size needs to be a positive integer.
+Integers of size 0 are forbidden. A MIT-licensed reference
+implementation of the CTF portable bitfields is available at:
 
   http://git.efficios.com/?p=babeltrace.git;a=blob;f=include/babeltrace/bitfield.h
 
@@ -357,9 +358,10 @@ ranges (or single values) to strings. Instead of being limited to simple
 "value -> string" mappings, these enumerations map
 "[ start_value ... end_value ] -> string", which map inclusive ranges of
 values to strings.  An enumeration from the C language can be represented in
-this format by having the same start_value and end_value for each element, which
-is in fact a range of size 1. This single-value range is supported without
-repeating the start and end values with the value = string declaration.
+this format by having the same start_value and end_value for each
+mapping, which is in fact a range of size 1. This single-value range is
+supported without repeating the start and end values with the value =
+string declaration.  Enumerations need to contain at least one entry.
 
 enum name : integer_type {
   somestring          = start_value1 ... end_value1,
@@ -460,12 +462,17 @@ A CTF variant is a selection between different types. A CTF variant must
 always be defined within the scope of a structure or within fields
 contained within a structure (defined recursively). A "tag" enumeration
 field must appear in either the same static scope, prior to the variant
-field (in field declaration order), in an upper static scope , or in an
+field (in field declaration order), in an upper static scope, or in an
 upper dynamic scope (see Section 7.3.2). The type selection is indicated
 by the mapping from the enumeration value to the string used as variant
 type selector. The field to use as tag is specified by the "tag_field",
 specified between "< >" after the "variant" keyword for unnamed
-variants, and after "variant name" for named variants.
+variants, and after "variant name" for named variants. It is not
+required that each enumeration mapping appears as variant type tag
+field. It is also not required that each variant type tag appears as
+enumeration mapping. However, it is required that any enumeration
+mapping encountered within a stream has a matching variant type tag
+field.
 
 The alignment of the variant is the alignment of the type as selected by
 the tag value for the specific instance of the variant.  The size of the
@@ -935,7 +942,7 @@ header is selected. NR_FIELDS is the number of fields within the event (a
 numeric value).
 
   event {
-    context = struct {
+    context := struct {
       variant <id> {
         struct { } compact;
         struct {
@@ -1385,7 +1392,7 @@ stream {
        event.header := struct {
                uint64_ccnt_t timestamp;
                /* ... */
-       }
+       };
        packet.context := struct packet_context;
 };
 
This page took 0.022384 seconds and 4 git commands to generate.