X-Git-Url: http://git.efficios.com/?p=ctf.git;a=blobdiff_plain;f=common-trace-format-proposal.txt;h=7f978306bd44eeb91ca40136a1c20c8a5f803324;hp=f2f7e232b4b7b0a23513a74ac24490b8286664ce;hb=58997e9ef63f13c99701c619a1c01eb33c617313;hpb=969f30c0f23e7a169d534315b4fcc07ca58362b9 diff --git a/common-trace-format-proposal.txt b/common-trace-format-proposal.txt index f2f7e23..7f97830 100644 --- a/common-trace-format-proposal.txt +++ b/common-trace-format-proposal.txt @@ -530,14 +530,10 @@ the metadata. Fixed layout (event packet header): -- Magic number (CTF magic numbers: 0xC1FC1FC1 and its reverse endianness - representation: 0xC11FFCC1) It needs to have a non-symmetric bytewise - representation. Used to distinguish between big and little endian traces (this - information is determined by knowing the endianness of the architecture - reading the trace and comparing the magic number against its value and the - reverse, 0xC11FFCC1). This magic number specifies that we use the CTF metadata - description language described in this document. Different magic numbers - should be used for other metadata description languages. +- Magic number (CTF magic number: 0xC1FC1FC1 This magic number specifies + that we use the CTF metadata description language described in this + document. Different magic numbers should be used for other metadata + description languages. - Trace UUID, used to ensure the event packet match the metadata used. (note: we cannot use a metadata checksum because metadata can be appended to while tracing is active) @@ -597,6 +593,14 @@ trace { packet.header := struct event_packet_header; }; +If the trace_uuid is not present, no validation that the metadata +actually corresponds to the stream is performed. + +If the stream_id packet header field is missing, the trace can only +contain a single stream. Its "id" field can be left out, and its events +don't need to declare a "stream_id" field. + + 5.2 Event Packet Context Description Event packet context example. These are declared within the stream declaration @@ -865,6 +869,7 @@ The target dynamic scope must be specified explicitly when referring to a field outside of the local static scope. The dynamic scope prefixes are thus: + - Trace Packet Header: , - Stream Packet Context: , - Event Header: , - Stream Event Context: , @@ -890,15 +895,15 @@ 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. -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. +The stream "id" can be left out if there is only one stream in the +trace. The event "id" field can be left out if there is only one event +in a stream. trace { major = value; /* Trace format version */ minor = value; uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"; /* Trace UUID */ - endian = big OR little; /* Endianness (optional) */ + byte_order = be OR le; /* Endianness (required) */ packet.header := struct { uint32_t magic; uint8_t trace_uuid[16];