<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi Charles,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
I'm not sure why you can't embed a graph in your application. The idea is to make new events visible to your source component (or the iterator it provides) by exposing some form of "user data" as a shared context [1][2]. When the event is made available to
 the source through that context, your "write" function can then pass it down the graph by invoking the graph's "run" method.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
I'll see if I can find time to produce an exemple if you think it would be helpful.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
Jérémie</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
[1] <a href="https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-self-msg-iter.html#gaa0795c9c18725a844df5b5c705255977" id="LPlnk109950">https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-self-msg-iter.html#gaa0795c9c18725a844df5b5c705255977</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0 ContentPasted1">
[2] <a href="https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-self-comp.html#gae01283b1ee0c3945c4f54205a1528169" id="LPlnk333868">https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-self-comp.html#gae01283b1ee0c3945c4f54205a1528169</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0 ContentPasted1 ContentPasted2">
[3] <a href="https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-graph.html#gad2e1c1ab20d1400af1b552e70b3d567c" id="LPlnk394072">https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-graph.html#gad2e1c1ab20d1400af1b552e70b3d567c</a></div>
<div class="elementToProof">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jérémie Galarneau</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>EfficiOS Inc.</div>
<a href="https://www.efficios.com">https://www.efficios.com</a><br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lttng-dev <lttng-dev-bounces@lists.lttng.org> on behalf of chafraysse--- via lttng-dev <lttng-dev@lists.lttng.org><br>
<b>Sent:</b> February 9, 2023 04:15<br>
<b>To:</b> lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org><br>
<b>Subject:</b> Re: [lttng-dev] LTTng UST structure support</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Jérémie,<br>
<br>
Thx for your reply,<br>
I'm doing a mockup on an Ubuntu host for now<br>
Ok for the graph, I cannot embed it in my application though<br>
I wanted that application to directly output CTF (with compound types, <br>
excluding LTTng) but I guess I'll output it in my format and then <br>
post-process it in a bt2 graph with a custom source and the ctf sink<br>
<br>
Best regards,<br>
<br>
Charles<br>
<br>
> Hi Charles,<br>
> <br>
> I can't really comment on what the packages do, but babeltrace2 <br>
> provides those headers under "include/babeltrace2-ctf-writer" since <br>
> that library is somewhat "grafted" to the project. Which distro are you <br>
> using?<br>
> <br>
> As for where to "plug" your bindings, that library is there to maintain <br>
> compatibility with the ctf-writer library that was provided by <br>
> Babeltrace 1.x as it had a number of external users. I don't expect it <br>
> to keep up with new CTF versions.<br>
> <br>
> A more "future proof" integration point is to write a source component, <br>
> and instanciate it in a graph configured with the CTF filesystem sink, <br>
> and feed your events through the graph.<br>
> <br>
> Let me know if you want more information,<br>
> Jérémie<br>
> <br>
> --<br>
> Jérémie Galarneau<br>
> EfficiOS Inc.<br>
> <a href="https://www.efficios.com">https://www.efficios.com</a><br>
> <br>
> Le 2023-02-02 17:06, chafraysse@free.fr a écrit :<br>
> Hi,<br>
> <br>
> So I wrote a draft of Rust lib above ctf-writer, using the apis as<br>
> demonstrated in the ctf-writer test<br>
> For deployment I wanted to use "libbabeltrace2-ctf-writer.so" in the<br>
> "libbabeltrace2-dev" package but I could not locate the matching<br>
> includes in there or in the other babeltrace 2 packages<br>
> Did I miss them somewhere ? Should I have plugged in at another level<br>
> in babeltrace2 ?<br>
> <br>
> Best regards,<br>
> <br>
> Charles<br>
> <br>
> ----- Mail original -----<br>
> De: chafraysse@free.fr<br>
> À: "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com><br>
> Cc: lttng-dev@lists.lttng.org<br>
> Envoyé: Lundi 16 Janvier 2023 10:38:28<br>
> Objet: Re: [lttng-dev] LTTng UST structure support<br>
> <br>
> Hi Mathieu,<br>
> <br>
> Thanks for your reply :)<br>
> I'll stick to bt2 modules in the meantime then<br>
> I'll already be saving a ton of time with those and the CTF spec which<br>
> is great !<br>
> <br>
> Best regards,<br>
> <br>
> Charles<br>
> <br>
> ----- Mail original -----<br>
> De: "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com><br>
> À: chafraysse@free.fr, lttng-dev@lists.lttng.org<br>
> Envoyé: Jeudi 12 Janvier 2023 21:10:57<br>
> Objet: Re: [lttng-dev] LTTng UST structure support<br>
> <br>
> On 2023-01-09 09:02, chafraysse--- via lttng-dev wrote:<br>
>> Hi,<br>
>> <br>
>> I'm looking for a CTF writer to serialize instrumentations in an<br>
>> embedded Linux/Rust framework<br>
>> LTTng UST looked like a very strong option, but I want to serialize<br>
>> structures as CTF compound type structures and I did not see those<br>
>> supported in the doc or api<br>
> <br>
> This is correct. I am currently working on a new project called<br>
> "libside" (see <a href="https://git.efficios.com/?p=libside.git;a=summary)">https://git.efficios.com/?p=libside.git;a=summary)</a> which<br>
> features support for compound types.<br>
> <br>
> However, we still need to do the heavy-lifting implementation work of<br>
> integrating this with LTTng-UST. This is the plan towards supporting<br>
> compound types in LTTng-UST.<br>
> <br>
>> I'd love to have confirmation that I did not just miss something :)<br>
>> If LTTng UST is out for me I will probably try to use the ctf-writer<br>
>> module of babeltrace 2 instead<br>
> <br>
> For now the ctf-writer modules of bt2 would be an alternative to<br>
> consider, but remember that it is not designed for low-impact tracing<br>
> such as lttng-ust. So it depends on how much tracer overhead/runtime<br>
> impact you can afford in your use-case.<br>
> <br>
> Thanks,<br>
> <br>
> Mathieu<br>
> <br>
>> <br>
>> Best regards,<br>
>> <br>
>> Charles<br>
>> _______________________________________________<br>
>> lttng-dev mailing list<br>
>> lttng-dev@lists.lttng.org<br>
>> <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
> <br>
> --<br>
> Mathieu Desnoyers<br>
> EfficiOS Inc.<br>
> <a href="https://www.efficios.com">https://www.efficios.com</a><br>
_______________________________________________<br>
lttng-dev mailing list<br>
lttng-dev@lists.lttng.org<br>
<a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</div>
</span></font></div>
</body>
</html>