[PATCH] Generated event stream metadata file

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jun 26 05:16:53 UTC 2019


On 25/06/2019 18:03, Ravindra Kumar Meena wrote:
> 
>      > +/* 1024 events are defined. The events are taking values from 0
>     to 1023. */
>      > +typedef enum events_e : uint64_t {
>     Does this make the enum forced into a 64-bit integer type?
> 
> Yes, the rtems_record_event variable is 64 bit.
> 
> 
>      > +} rtems_record_event;
>      > +
>      > +trace {
>      > +    major = 1;
>      > +    minor = 8;
>      > +    byte_order = le;
>     The byte order may depend on the architecture of the CPU that
>     generates the trace, right?
> 
> Yes. It can depend on architecture as well.
> 
> 
>      > +};
>      > +
>      > +stream {
>      > +    event.header := struct {
>      > +        uint32_t id;
>      > +    };
>      > +};
>      > +
>      > +event {
>      > +    name = "RTEMS_RECORDING_EVENT";
>      > +    id=0;
>      > +    fields := struct {
>      > +               timestamp_t                  ns;
>      > +               uint32_t                     cpu;
>      > +        rtems_record_event           events;
>     Is the rtems_record_event in a stream 64-bits?
> 
> Yes.

Why do you think it is 64-bits?

To figure out the size of a type you can use GDB:

gdb ./build/misc/rtems-record
[...]
Reading symbols from ./build/misc/rtems-record...
(gdb) p sizeof(rtems_record_event)
$1 = 4
(gdb)

> 
> I am really stuck here. I am trying every possible way but only one 
> variable is printing the wrong value in babeltrace.

I think you rely to much on trial and error.

-- 
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.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list