X-Git-Url: http://git.efficios.com/?p=ctf.git;a=blobdiff_plain;f=common-trace-format-proposal.txt;h=f2f7e232b4b7b0a23513a74ac24490b8286664ce;hp=6e234350ad4bd779e286532df454864ae32e3009;hb=969f30c0f23e7a169d534315b4fcc07ca58362b9;hpb=eca1d06eabf2fa4b4ecc2ec13761b08585f399a4 diff --git a/common-trace-format-proposal.txt b/common-trace-format-proposal.txt index 6e23435..f2f7e23 100644 --- a/common-trace-format-proposal.txt +++ b/common-trace-format-proposal.txt @@ -582,12 +582,21 @@ Metadata-defined layout (event packet context): 5.1 Event Packet Header Fixed Layout Description +The event packet header layout is indicated by the trace packet.header +field. Here is an example structure type for the packet header with the +fields typically expected: + struct event_packet_header { uint32_t magic; uint8_t trace_uuid[16]; uint32_t stream_id; }; +trace { + ... + packet.header := struct event_packet_header; +}; + 5.2 Event Packet Context Description Event packet context example. These are declared within the stream declaration @@ -879,12 +888,22 @@ readable by accessing the upper dynamic scopes. The grammar representing the TSDL metadata is presented in Appendix C. TSDL Grammar. This section presents a rather ligher reading that -consists in examples of TSDL metadata, with template values: +consists in examples of TSDL metadata, with template values. + +Note that the trace endianness is usually extracted from the packet +header magic number. The "endian" field is only needed when the magic +number packet header field is not present. trace { major = value; /* Trace format version */ minor = value; uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"; /* Trace UUID */ + endian = big OR little; /* Endianness (optional) */ + packet.header := struct { + uint32_t magic; + uint8_t trace_uuid[16]; + uint32_t stream_id; + }; }; stream {