Add embedded metadata examples
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 22 Apr 2011 14:52:44 +0000 (10:52 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 22 Apr 2011 14:52:44 +0000 (10:52 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-test/succeed/ctf-embedded-1.txt [new file with mode: 0644]
formats/ctf/metadata/ctf-test/succeed/ctf-embedded-2.txt [new file with mode: 0644]

diff --git a/formats/ctf/metadata/ctf-test/succeed/ctf-embedded-1.txt b/formats/ctf/metadata/ctf-test/succeed/ctf-embedded-1.txt
new file mode 100644 (file)
index 0000000..42c4914
--- /dev/null
@@ -0,0 +1,37 @@
+
+trace {
+       major = 0;
+       major = 1;
+       uuid = "f816d884-6cea-11e0-ac7a-8f5f4e9f7724";
+       word_size = 32;
+};
+
+/* Architecture with 32-bit pointers, 32-bit integers, 32-bit longs */
+
+typealias integer { size = 32; align = 32; signedness = false; } : uint32_t;
+typealias integer { size = 64; align = 64; signedness = false; } : uint64_t;
+typealias integer { size = 32; align = 32; signedness = false; } : void *;
+
+stream {
+       id = 0;
+       event.header := struct {
+               uint32_t id;
+               uint64_t timestamp;
+       };
+       event.context := struct {       /*
+               uint32_t thread_id;      * This context belongs to all
+               void *func_called;       * events in this stream.
+               void *called_from;       */
+               uint32_t event_count;   /* for debug */
+       };                      
+};
+
+/*
+ * All events have empty context/fields, because their field layout is
+ * replicated for all events of the stream (in this particular trace
+ * layout). See ctf-embedded-2.txt for a more compact layout.
+ */
+
+event { name = invalid; id = 0; stream = 0; };
+event { name = func_enter; id = 1; stream = 0; };
+event { name = func_exit; id = 2; stream = 0; };
diff --git a/formats/ctf/metadata/ctf-test/succeed/ctf-embedded-2.txt b/formats/ctf/metadata/ctf-test/succeed/ctf-embedded-2.txt
new file mode 100644 (file)
index 0000000..163a198
--- /dev/null
@@ -0,0 +1,43 @@
+
+trace {
+       major = 0;
+       major = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       word_size = 32;
+};
+
+/* Architecture with 32-bit pointers, 32-bit integers, 32-bit longs */
+
+typealias integer { size = 1; align = 1; signedness = false; } : uint1_t;
+typealias integer { size = 63; align = 1; signedness = false; } : timestamp_t;
+
+typealias integer { size = 32; align = 32; signedness = false; } : uint32_t;
+typealias integer { size = 32; align = 32; signedness = false; } : void *;
+
+stream {
+       id = 0;
+       event.header := struct {
+               uint1_t id;
+               timestamp_t timestamp;
+       };
+       event.context := struct {
+               uint32_t thread_id;
+               uint32_t event_count;
+       };                      
+};
+
+event {
+       name = func_enter;
+       id = 0;
+       stream = 0;
+       fields := struct {
+               void *func_called;
+               void *called_from;
+       };
+};
+
+event {
+       name = func_exit;
+       id = 1;
+       stream = 0;
+};
This page took 0.024758 seconds and 4 git commands to generate.