<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">> I want to make babeltrace read my metadata file and event stream stored in<br>
> a file. How does babeltrace read an arbitrary CTF session(CTF+event stream)?<br>
<br>
Babeltrace traverses the tree and look for files named "metadata"<br>
. All files at the same depth of a metadata file are considered CTF streams.<br>
<br>
e.g:<br>
/tmp/<br>
my-trace/<br>
another_dir/<br>
abcd<br>
efgh<br>
metadata<br>
<br>
babeltrace /tmp/my-trace/<br>
<br>
The files "abcd" and "efgh" will be considered stream files and babeltrace will<br>
try to read them.<br>
<br>
You can have hidden file (".abcd") at the same depth, they will not be<br>
considered.<br>
<br>
> <br>
> What should be the file format to store the event stream? I will use<br>
> fwrite() to store the events.<br>
<br>
The CTF format.<br><br></blockquote><div>Okay. This worked for me. Thanks :)</div><div><br></div><div>Now I know how to write the metadata file but one thing I am not sure that how should I relate the TSDL description of metadata with my system events?</div><div><br></div><div>Like I have this in my system:</div><div><br></div><div>typedef struct ctf_event {<br> uint64_t ns;<br> uint32_t cpu;<br> rtems_record_event event;<br> uint64_t data;<br>} ctf_event;<br></div><div><br></div><div>How should I relate it with TSDL description of metadata? It should match with the TSDL description. Isn't it?</div><div><br></div><div>Thanks</div></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>