[PATCH v2] Write event stream in file

Ravindra Kumar Meena rmeena840 at gmail.com
Wed Jun 26 04:20:10 UTC 2019


>
> > +  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190626/8cf5dc79/attachment-0002.html>


More information about the devel mailing list