>
> > +  ctf_item.event = __builtin_bswap32( item->event );
>
> Why is there this byte swap?
>

It will set its value in big-endian. Since this value will be passed as
big-endian. I have defined the typealias for the same in the metadata.

typealias integer { size = 64; align = 8; signed = false; byte_order=be; }
:= uint64_t_be;

The trace description in our metadata is

trace {
    major = 1;
    minor = 8;
    byte_order = le;
};

This defines that babeltrace has to read in little-endian byte order.
Hence, giving out correct value.

So basically we are passing big-endian value so that babeltrace can read it
in little-endian.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
<https://www.iitism.ac.in/>, Dhanbad
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to