From 570ecabebb5ce0398f044cb6389f33901b08cc4a Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 1 Feb 2012 17:26:53 -0500 Subject: [PATCH 1/1] Add env {} declarations to specification Signed-off-by: Mathieu Desnoyers --- common-trace-format-specification.txt | 29 +++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/common-trace-format-specification.txt b/common-trace-format-specification.txt index d306ffc..dedf593 100644 --- a/common-trace-format-specification.txt +++ b/common-trace-format-specification.txt @@ -1029,14 +1029,14 @@ path lookups) and for sequence references to length fields. 7.3.1 Lexical Scope -Each of "trace", "stream", "event", "struct" and "variant" have their own -nestable declaration scope, within which types can be declared using "typedef" -and "typealias". A root declaration scope also contains all declarations -located outside of any of the aforementioned declarations. An inner -declaration scope can refer to type declared within its container -lexical scope prior to the inner declaration scope. Redefinition of a -typedef or typealias is not valid, although hiding an upper scope -typedef or typealias is allowed within a sub-scope. +Each of "trace", "env", "stream", "event", "struct" and "variant" have +their own nestable declaration scope, within which types can be declared +using "typedef" and "typealias". A root declaration scope also contains +all declarations located outside of any of the aforementioned +declarations. An inner declaration scope can refer to type declared +within its container lexical scope prior to the inner declaration scope. +Redefinition of a typedef or typealias is not valid, although hiding an +upper scope typedef or typealias is allowed within a sub-scope. 7.3.2 Static and Dynamic Scopes @@ -1075,6 +1075,7 @@ header as selector. The dynamic scope prefixes are thus: + - Trace Environment: , - Trace Packet Header: , - Stream Packet Context: , - Event Header: , @@ -1123,6 +1124,16 @@ trace { }; }; +/* + * The "env" (environment) scope contains assignment expressions. The + * field names and content are implementation-defined. + */ +env { + pid = value; /* example */ + proc_name = "name"; /* example */ + ... +}; + stream { id = stream_id; /* Type 1 - Few event IDs; Type 2 - Many event IDs. See section 6.1. */ @@ -1409,6 +1420,7 @@ char clock double enum +env event floating_point float @@ -1723,6 +1735,7 @@ typedef-name: ctf-specifier: event { ctf-assignment-expression-list-opt } stream { ctf-assignment-expression-list-opt } + env { ctf-assignment-expression-list-opt } trace { ctf-assignment-expression-list-opt } typealias declaration-specifiers abstract-declarator-list type-assignment-operator declaration-specifiers abstract-declarator-list typealias declaration-specifiers abstract-declarator-list type-assignment-operator declarator-list -- 2.34.1