[PATCH v2] Comment added
Ravindra Meena
rmeena840 at gmail.com
Sun Jun 16 18:13:59 UTC 2019
---
misc/CTF/record-ctf.ref | 55 +++++++++++++++++++++++++++++++++----------------
1 file changed, 37 insertions(+), 18 deletions(-)
diff --git a/misc/CTF/record-ctf.ref b/misc/CTF/record-ctf.ref
index a27757c..bdb9648 100644
--- a/misc/CTF/record-ctf.ref
+++ b/misc/CTF/record-ctf.ref
@@ -1,5 +1,13 @@
/* CTF 1.8 */
+/*
+ * typealias
+ *
+ * The "typealias" declaration can be used to give a name to a type.
+ * Typealias is a superset of "typedef": it also allows assignment of a
+ * simple variable identifier to a type.
+ */
+
typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
@@ -8,47 +16,58 @@ typealias integer { size = 5; align = 1; signed = false; } := uint5_t;
typealias integer { size = 27; align = 1; signed = false; } := uint27_t;
trace {
- major = 1;
- minor = 8;
- byte_order = le;
+ major = 1; /* CTF spec version major number */
+ minor = 8; /* CTF spec version minor number */
+ byte_order = le; /* little endian byte-order */
packet.header := struct {
- uint32_t magic;
- uint32_t stream_id;
+ uint32_t magic; /* specifies that this is a CTF packet */
+ uint32_t stream_id; /* used as reference to stream description in metadata */
};
};
clock {
- name = ctf_clock;
- freq = 1000;
- offset_s = 1421703448;
+ name = ctf_clock; /* name of montonic clock */
+ freq = 1000; /* frequency, in HZ */
+ offset_s = 1421703448;
};
+/*
+ * A reference to the clock added within an integer type
+ */
+
typealias integer {
size = 64;
map = clock.ctf_clock.value;
} := ctf_clock_int_t;
+/*
+ * Trace stream packet having header and context.
+ *
+ * @param event.header includes id(unique identifier of stream) and timestamp.
+ * @param packet.context includes clock timestamp, cpu id, event and event data.
+ */
+
stream {
id = 0;
+ event.header := struct {
+ uint32_t id;
+ ctf_clock_int_t timestamp;
+ };
packet.context := struct {
ctf_clock_int_t timestamp;
uint32_t cpu;
uint32_t event;
uint64_t data;
};
- event.header := struct {
- uint32_t id;
- ctf_clock_int_t timestamp;
- };
};
event {
- id = 0;
- name = "ctf_event";
- stream_id = 0;
+ id = 0; /* event id
+ name = "ctf_event"; /* event name */
+ stream_id = 0; /* signifies stream id which event is supposed to concat with events */
fields := struct {
- uint32_t a;
- uint16_t b;
- string c;
+ uint32_t a; /*event 1*/
+ uint16_t b; /*event 2*/
+ string c; /*event 3*/
};
};
--
2.7.4
More information about the devel
mailing list