[PATCH v2] Comment added
Ravindra Kumar Meena
rmeena840 at gmail.com
Mon Jun 17 10:45:50 UTC 2019
On Mon, Jun 17, 2019 at 1:45 PM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> On 16/06/2019 20:13, Ravindra Meena wrote:
> > ---
> > 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
> [...]
> > clock {
> > - name = ctf_clock;
> > - freq = 1000;
> > - offset_s = 1421703448;
> > + name = ctf_clock; /* name of montonic clock */
> > + freq = 1000; /* frequency, in HZ */
>
> Why 1000Hz?
>
The freq field is the initial frequency of the clock, in Hz. If the freq
field is not present, the frequency is assumed to be 1000000000 (providing
clock increment of 1 ns). I set to 1000HZ just for getting started.
>
> > + offset_s = 1421703448;
>
> What is this for an offset?
>
This offset is a difference between the beginning of clock and the actual
start of the clock. The event will be recorded just after the offset.
>
> > };
> >
> > +/*
> > + * A reference to the clock added within an integer type
> > + */
> > +
> > typealias integer {
> > size = 64;
> > map = clock.ctf_clock.value;
> > } := ctf_clock_int_t;
>
> Why does this start with "ctf_"?
>
ctf_clock is the name of clock struct I created just above this. It is a
reference to the clock name.
>
> >
> > +/*
> > + * 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;
>
> What is this for an id?
>
It is a unique identifier for stream header. There will be many streams so
in order to identify the streams I have set the id here.
>
> > + ctf_clock_int_t timestamp;
>
> Timestamp of what?
>
It is the timestamp of the stream header. It is different from event
header. The event heder can have a beginning and ending 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*/
>
> What are events 1, 2, 3?
>
I have added this event just for getting started. I thought it would be
better to get it reviewed this much TSDL code.
--
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
<https://www.iitism.ac.in/>, Dhanbad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190617/1c80501c/attachment-0002.html>
More information about the devel
mailing list