<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">the basic structure is now similar to the LTTNG output. The next step is <br>
to produce a packet header identical to LTTNG:<br>
<br>
trace {<br>
major = 1;<br>
minor = 8;<br>
uuid = "6a7715d0-b502-4c65-8678-6777ac7f755a";<br>
byte_order = le;<br>
packet.header := struct {<br>
uint32_t magic;<br>
uint8_t uuid[16];<br>
uint32_t stream_id;<br>
uint64_t stream_instance_id;<br>
};<br>
};<br></blockquote><div>I have added the ctf magic(0xC1FC1FC1) in header. I am facing difficulty in adding uuid in header. uuid is 128 a bit number which has 5 octets of 8-4-4-4-12 bytes. So this is something i did:</div><div><br></div><div>#define UUID_octet_1 0x6a7715d0<br>#define UUID_octet_2 0xb502<br>#define UUID_octet_3 0x4c65<br>#define UUID_octet_4 0x8678<br>#define UUID_octet_5 0x6777ac7f755a<br></div><div><br></div><div>typedef struct bit_field<br>{<br> unsigned x: 12; // 12 bits<br>} bit_field;<br></div><div><br></div><div>typedef struct ctf_uuid {<br> uint32_t octet1;<br> uint16_t octet2;<br> uint16_t octet3;<br> uint16_t octet4;<br> bit_field octet5;<br>} ctf_uuid;<br></div><div><br></div><div>The babeltrace has recognized the ctf magic number but not able to recognize uuid. Is there something else method to add uuid in header?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Move the generation of the metadata file to the record client.<br>
<br>
Generate the clock dynamically, e.g. the use the current CLOCK_REALTIME <br>
to set the offset.<br>
<br>
clock {<br>
name = "monotonic";<br>
uuid = "234d669d-7651-4bc1-a7fd-af581ecc6232";<br>
description = "Monotonic Clock";<br>
freq = 1000000000; /* Frequency, in Hz */<br>
/* clock value offset from Epoch is: offset * (1/freq) */<br>
offset = 1539783991179109789;<br>
};<br>
<br>
Add a LTTNG compatible packet context:<br>
<br>
struct packet_context {<br>
uint64_clock_monotonic_t timestamp_begin;<br>
uint64_clock_monotonic_t timestamp_end;<br>
uint64_t content_size;<br>
uint64_t packet_size;<br>
uint64_t packet_seq_num;<br>
unsigned long events_discarded;<br>
uint32_t cpu_id;<br>
};<br></blockquote><div>Okay </div></div><br clear="all"><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>