[lttng-dev] [babeltrace] About the type read and write

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Aug 23 08:27:54 EDT 2012


* Hui Zhu (teawater at gmail.com) wrote:
> Hi,
> 
> I just tried to use libbabeltrace to read and write the CTF file.  But
> I cannot find the api to read some type of CTF for example
> CTF_TYPE_ENUM, CTF_TYPE_STRUCT.

AFAIU, the API bt_ctf_get_field_list allows to get the list of
definitions from a struct, variant, array, or sequence (any compound
type). Julien, I think the header documentation of this function should
really be updated, can you look into that ?

Indeed, I also cannot see any API to get the enum string from the field.
Julien, can we add it ?

> And I cannot find the api file to write to the CTF file. (I check the
> code of babeltrace-log and found that it use the function that is not
> API)

Currently, babeltrace only does CTF-to-text and text-log-to-CTF
conversions. As you noticed, it does not expose API to write into all
CTF types at this stage.

There is a prototype I am aware of that does just that (write custom CTF
files): Javeltrace. See the post here
http://lists.lttng.org/pipermail/lttng-dev/2012-August/018393.html for
details.

Thanks,

Mathieu

> 
> Could you help me with it?
> 
> Thanks,
> Hui
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list