<div dir="ltr"><div class="gmail_quote"><div>Hi,<br></div><div><br></div><div>I had a look at the variant examples documented here <a href="https://diamon.org/ctf/#ex-variants">https://diamon.org/ctf/#ex-variants</a>. The examples explain how variant work. First, it takes the id and on the basis of id passed it selects the struct(compact, extended) present in variant data-type.</div><div><br></div><div>If id passed to the variant is in the range is [0,30] then variant selects compact struct and if id=31 is passed to the variant then extended struct is selected.</div><div><br></div><div>Since our recording timestamp is of 64 bit. So we have to pass 31 in enum id. Our recording final event.header in binary stream file will look this: </div><div><br></div><div><enum_id=31> <event_id=0> <64-bit timestamp> </div><div><br></div><div><a href="https://github.com/rmeena840/rtems-tools/commit/da100caecda9c69a08f73edbe849fad022fe1384">https://github.com/rmeena840/rtems-tools/commit/da100caecda9c69a08f73edbe849fad022fe1384</a><br></div><div><br></div><div>It was not previously before because I forgot to add event.header size in both content_size and packet_size.</div><div><br></div><div>I tested the babeltrace output with/without event_header_compact. The babeltrace is printing the same output.</div><div><br></div><div>[19:32:26.679052982] (+0.000000000) Record_Item RTEMS_RECORDING_EVENT: { cpu_id = 18 }, { event = ( "RTEMS_RECORD_THREAD_SWITCH_IN" : container = 215 ), data = 167837739 }<br>[19:32:26.679099590] (+0.000046608) Record_Item RTEMS_RECORDING_EVENT: { cpu_id = 5 }, { event = ( "RTEMS_RECORD_THREAD_SWITCH_OUT" : container = 216 ), data = 167837707 }<br>[19:32:26.679099590] (+0.000000000) Record_Item RTEMS_RECORDING_EVENT: { cpu_id = 5 }, { event = ( "RTEMS_RECORD_THREAD_STACK_CURRENT" : container = 209 ), data = 32320 }<br>[19:32:26.679099590] (+0.000000000) Record_Item RTEMS_RECORDING_EVENT: { cpu_id = 5 }, { event = ( "RTEMS_RECORD_THREAD_SWITCH_IN" : container = 215 ), data = 151060501 }<br></div><div><br></div><div>I have also added the env object in the metadata. Please check it's member value if they are up to the requirement of rtems.</div><div><br></div><div><a href="https://github.com/rmeena840/rtems-tools/commit/96b082a6a31a1ebf6ea05b475a7e6c8378e456e7">https://github.com/rmeena840/rtems-tools/commit/96b082a6a31a1ebf6ea05b475a7e6c8378e456e7</a><br></div><div><br></div><div>Have a look</div><div><br></div><div>Thanks</div></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="4"><b>Ravindra Kumar Meena</b></font>,<div><span style="color:rgb(102,102,102)">B. Tech. Computer Science and Engineering,<br></span></div><div><span style="color:rgb(102,102,102)"><a href="https://www.iitism.ac.in/" style="color:rgb(17,85,204)" target="_blank">Indian Institute of Technology (Indian School of Mines)</a>, Dhanbad</span></div></div></div></div></div></div>