<div>Thank you for your answer.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 29, 2024 at 4:23 PM Thomas Monjalon <<a href="mailto:thomas@monjalon.net">thomas@monjalon.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">29/11/2024 21:39, Adel Belkhiri:<br>
> Thank you for the clarification, Thomas. Indeed, the documentation for the<br>
> trace library is kind of limited. If you don't mind, I have another<br>
> question: Would it be useful to have an API to register a callback (to save<br>
> trace data) when the buffer is full?<br>
<br>
I suppose yes, the problem being which thread is running file writing.<br>
<br>
I leave it to the maintainers of the trace library.<br>
<br>
<br>
> On Fri, Nov 29, 2024 at 6:44 AM Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>> wrote:<br>
> > 28/11/2024 20:17, Adel Belkhiri:<br>
> > > Hi all,<br>
> > ><br>
> > > Recently, while tracing applications from the apps and examples<br>
> > > directories, I became confused about when the trace buffer is written to<br>
> > > disk. Is the trace data saved only when rte_save_trace() is called, or<br>
> > does<br>
> ><br>
> > It is rte_trace_save()<br>
> ><br>
> > > it also automatically save when the buffer becomes full?<br>
> ><br>
> > No, DPDK is not doing such thing without user agreement.<br>
> ><br>
> > > From my understanding, rte_save_trace() is invoked when the application<br>
> > > executes rte_eal_cleanup(). Does this mean the target application needs<br>
> > to<br>
> > > explicitly support tracing by calling rte_save_trace()—perhaps at regular<br>
> > > intervals—to dump the trace buffer to disk? Otherwise, will we only get a<br>
> > > fragment of the trace saved during rte_eal_cleanup() execution?<br>
> ><br>
> > Yes you get it right.<br>
> ><br>
> > > Thank you for clarifying this point.<br>
> ><br>
> > Thanks for asking.<br>
> ><br>
> > If you think the doc below is not clear enough,<br>
> > do not hesitate to submit a patch to make the doc better:<br>
> ><br>
> >         <a href="https://doc.dpdk.org/guides/prog_guide/trace_lib.html" rel="noreferrer" target="_blank">https://doc.dpdk.org/guides/prog_guide/trace_lib.html</a><br>
<br>
<br>
<br>
</blockquote></div></div>