[PATCH v2] Comment added

2019-06-16 Thread Ravindra Meena
---
 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

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] CTF TSDL

2019-06-16 Thread Ravindra Kumar Meena
Hi Sebastian,

I have added comments on the TSDL code. I have sent the new patch.
Please have a look.

Thanks

On Fri, Jun 14, 2019 at 4:57 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> Hello Ravindra,
>
> could you please add some comments which explain the magic numbers, e.g.
> 1421703448 and the relationship to the raw event recording items
> (rtems_record_item) and data which is already somehow converted by the
> client.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2] Comment added

2019-06-16 Thread Chris Johns
On 17/6/19 4:13 am, Ravindra Meena wrote:
> ---
>  misc/CTF/record-ctf.ref | 55 
> +

We should avoid uppercase or mix case in file names unless they are existing or
in imported code. We have some hosts that are case insensitive and our
experience over the years is this can cause problems. :)

Is this file for the rtems-tools repo? If it is not please ignore the following.

I wonder if there should be a top level trace directory to gather all the trace
pieces in one place. I think trace is important enough to have this status. So
this file could be ...

 trace/config/ctf/record-ctf.ref

or

 trace/config/record-ctf.ref

? This is only an example as I am not really sure what role this file plays.

Notes:

1) I have found in other parts of rtems-tools.git having the config directory of
files separated from the other sources makes installing into the shared tree
simpler.

2) The tools currently in rtems-tools.git can be run with the same command line
options from a built repo with an absolute path or when installed under a
prefix. This is something to consider when referencing configuration files.

Thanks
Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel