GSoC Project | Basic Support for Trace Compass

Ravindra Kumar Meena rmeena840 at
Thu Jul 18 09:28:19 UTC 2019

> I would use two structures for this in C, one for the compact header and
> one for the large header. I would not use bit fields in C.
Without bit fields how I would assign it exact 27-bit timestamp?

It is mentioned on that we can use
union in C for variant data-type.

In metadata enum in header_compact is defined like this:
enum : uint5_t { compact = 0 ... 30, extended = 31 } id;
It has two members. The compact members has range from 0 to 31 but we can't
define range in enum members in C

> You have to figure out how the 27-bit timestamp works. It must relative
> to some reference point.
I looked into the Trace Compass example. The content in the binary file is
formatted as follow:

This much we have already achieved.

< 8-bit data. It is always in 31( 1F )> <32-bit event_id> <64-bit
timestamp> <event_fields>

Now after this

<32-bit data> <event_fields> again <32-bit data> <event_fields> agina <
32-bit data> <event_fields> ....

I am not able to understand what this <32-bit data> is between every

> How is the id used? We are interested in the sched_switch events.

*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
<>, Dhanbad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list