On 12/07/2019 05:58, Ravindra Kumar Meena wrote:
        Why don't you simply use the above in your C code as well?

    Yes. I tried that but compiler reports the value is too large.
    ../misc/record/record-main.c:357:27: warning: integer constant is
    too large for its type
          ctf_header.uuid[16] = 0x6a7715d0b5024c6586786777ac7f755a;


Okay. I was thinking in the wrong direction.

Could you please obtain a C language book for the remainder of this project. You have very basic issues with this programming language. I don't have time to teach you very basic C as a side-effect of this GSoC project.

I simplified the uuid initialization a bit:

https://github.com/rmeena840/rtems-tools/commit/5fc194cc1f04f8feea980243e5997f7cd6f91313

I have now added uuid also in the stream header.

https://github.com/rmeena840/rtems-tools/commit/fa17148220dfd9a1df1f3d8cfad0b4afd19c331f

https://github.com/rmeena840/rtems-tools/commit/05dbb29c72a5cceee054a996a8e799520d7b2817

Tested on AWS. No warnings.

In the packet.header you mentioned to added stream_instance_id. See below.
What is it?

I don't know. Please ask this on the LTTNG mailing list. For now just add this field and set it to zero.

In the documentation it is mentioned that packet.header can only contain three values(magic, uuid, stream_id).

Which documentation, which section?


trace {
         major = 1;
         minor = 8;
         uuid = "6a7715d0-b502-4c65-8678-6777ac7f755a";
         byte_order = le;
         packet.header := struct {
                 uint32_t magic;
                 uint8_t  uuid[16];
                 uint32_t stream_id;
                 uint64_t stream_instance_id;
         };
};

LTTNG uses this stuff, so please use it also as is.

Please name the structures in the code and the CFT metadata consistently. You have at least these structures:

* packet header

* packet context

* event header

* event context

* specific events

You currently have only:

typedef struct ctf_header {
  uint32_t                     ctf_magic;
  uint8_t                      uuid[ 16 ];
  uint32_t                     stream_id;
  uint32_t                     cpu_id;
} ctf_header;

typedef struct ctf_event {
  uint64_t                     ns;
  rtems_record_event           event;
  uint64_t                     data;
} __attribute__((__packed__)) ctf_event;

You have to re-organize this to match the LTTNG structures.

--
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.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to