Update named types
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Jan 2011 00:03:29 +0000 (19:03 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Jan 2011 00:03:29 +0000 (19:03 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
common-trace-format-proposal.txt

index 15a90422e80fd72b619330b66b63ba0624ab3342..3b4e407c38c30a01ae71f394d57a157de128b71b 100644 (file)
@@ -717,7 +717,7 @@ stream {
 };
 
 event {
 };
 
 event {
-  name = eventname;
+  name = event_name;
   id = value;                  /* Numeric identifier within the stream */
   stream = stream_id;
   fields = struct {
   id = value;                  /* Numeric identifier within the stream */
   stream = stream_id;
   fields = struct {
@@ -727,18 +727,34 @@ event {
 
 /* More detail on types in section 4. Types */
 
 
 /* More detail on types in section 4. Types */
 
-/* Named types */
-typedef some existing type new_type;
+/*
+ * Named types:
+ *
+ * A named type can only have a prefix and postfix if it aliases a CTF basic
+ * type. A type name aliasing another type name cannot have prefix nor postfix,
+ * but the type aliased can have a prefix and/or postfix.
+ */
+
+typedef aliased_type_prefix aliased_type new_type aliased_type_postfix;
+/* e.g.: typedef struct example new_type_name[10]; */
 
 typedef type_class {
   ...
 
 typedef type_class {
   ...
-} new_type;
+} new_type_prefix new_type new_type_postfix;
+/*
+ * e.g.: 
+ * typedef integer {
+ *   size = 32;
+ *   align = 32;
+ *   signed = false;
+ * } struct page *;
+ */
 
 struct name {
   ...
 };
 
 
 struct name {
   ...
 };
 
-enum name {
+enum <integer_type> name {
   ...
 };
 
   ...
 };
 
@@ -747,7 +763,7 @@ struct {
   ...
 };
 
   ...
 };
 
-enum {
+enum <integer_type> {
   ...
 };
 
   ...
 };
 
This page took 0.024177 seconds and 4 git commands to generate.