[lttng-dev] Need help in converting trace data into CTF

Ravindra Kumar Meena rmeena840 at gmail.com
Thu Jun 20 12:41:37 EDT 2019


>
> >  I want to make babeltrace read my metadata file and event stream stored
> in
> > a file. How does babeltrace read an arbitrary CTF session(CTF+event
> stream)?
>
> Babeltrace traverses the tree and look for files named "metadata"
> . All files at the same depth of a metadata file are considered CTF
> streams.
>
> e.g:
>    /tmp/
>        my-trace/
>            another_dir/
>                abcd
>                efgh
>                metadata
>
> babeltrace /tmp/my-trace/
>
> The files "abcd" and "efgh" will be considered stream files and babeltrace
> will
> try to read them.
>
> You can have hidden file (".abcd") at the same depth, they will not be
> considered.
>
> >
> > What should be the file format to store the event stream? I will use
> > fwrite() to store the events.
>
> The CTF format.
>
> Okay. This worked for me. Thanks :)

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?

Like I have this in my system:

typedef struct ctf_event {
  uint64_t                     ns;
  uint32_t                     cpu;
  rtems_record_event           event;
  uint64_t                     data;
} ctf_event;

How should I relate it with TSDL description of metadata? It should match
with the TSDL description. Isn't it?

Thanks

-- 
*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: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190620/17e76d18/attachment.html>


More information about the lttng-dev mailing list