[lttng-dev] Python CTF writer example

Francis Giraldeau francis.giraldeau at gmail.com
Fri Sep 13 19:03:59 EDT 2019


Hello!

It looks like there are some issues with the Python CTF writer example with
babeltrace stable-1.5.

* Import error, should replace "import babeltrace.writer as btw" by "from
babeltrace import CTFWriter as btw"
* The FloatingPointDeclaration does not exists and should be replaced
by FloatFieldDeclaration
* babeltrace.common.CTFStringEncoding.UTF8 is
instead babeltrace.CTFStringEncoding.UTF8
* The variant still had issue that I cannot fix (ValueError("Invalid tag
provided.") babeltrace.py:2221)

Events with simple fields are working okay with these changes. I thought
that the clock would be updated automatically when appending the event, but
that would be nice also to add it to the example.

I tried babeltrace 2.0.0-pre6, but the writer API seems to have
disappeared. I was looking at how to create a ctf.fs.sink, but I was not
successful. Is writing CTF traces with the Python bindings still possible?

Regards,

-- 
Francis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190913/03f09988/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctf-writer-example
Type: application/octet-stream
Size: 1522 bytes
Desc: not available
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190913/03f09988/attachment.obj>


More information about the lttng-dev mailing list