[lttng-dev] sink.ctf.fs vs bt_ctf_writer

Michael Gruner michael.gruner at ridgerun.com
Mon Aug 24 17:21:51 EDT 2020


Hi all

I’m integrating CTF support to a third party framework. To do so, I decided to go with the Babeltrace 2 API (I love the rewrite BTW). So basically I made my custom plug-in and the framework spawns the following processing graph:

My Framework ->  SOURCE.MYPLUGIN.MYCOMPONENT -> SINK.CTF.FS

This effectively generates a valid set of CTF traces. However, when exploring the Babeltrace2 source I found the existence of a bt_ctf_writer, which seems like a convenience object to write CTF directly (without the need of the graph). This would’ve been a much simpler approach for my use case, so I’m evaluating to rewrite using bt_ctf_writer in favor of simplicity and maintainability. My questions are:

Should bt_ctf_writer be used? 
bt_ctf_writer is not documented, is it because is being deprecated?
Seems like sink.ctf.fs performs the trace and metadata write back to disk when it receives the end message, whereas with bt_ctf_writer I can manually flush them (which is very convenient to me). Is there a way to achieve this using the graph?

Thanks!
Michael
www.ridgerun.com <http://www.ridgerun.com/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20200824/34c1cf93/attachment.htm>


More information about the lttng-dev mailing list