From: Mathieu Desnoyers Date: Fri, 21 Jan 2011 20:11:31 +0000 (-0500) Subject: Add "tagged" union X-Git-Tag: v1.8~87 X-Git-Url: http://git.efficios.com/?p=ctf.git;a=commitdiff_plain;h=77a98c82d80ca2d562e29c32380feeffdcd6f4c2;hp=c6d7abc5412a0f3d9bcf21a1f53041411c7e9120 Add "tagged" union Signed-off-by: Mathieu Desnoyers --- diff --git a/common-trace-format-proposal.txt b/common-trace-format-proposal.txt index a69c0a3..0daac2a 100644 --- a/common-trace-format-proposal.txt +++ b/common-trace-format-proposal.txt @@ -335,7 +335,7 @@ struct { ... } -4.2.2 Variants (Discriminated Unions) +4.2.2 Variants (Discriminated/Tagged Unions) 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 @@ -786,18 +786,13 @@ trace { stream { id = stream_id; - event { - header_alignment = value; - /* Type 1 - Few event IDs; Type 2 - Many event IDs. See section 6.2. */ - header = event_header_1 OR event_header_2; - context = struct { - ... - }; + /* Type 1 - Few event IDs; Type 2 - Many event IDs. See section 6.2. */ + event.header = event_header_1 OR event_header_2; + event.context = struct { + ... }; - packet { - context = struct { - ... - }; + packet.context = struct { + ... }; };