DPDK patches and discussions
 help / color / mirror / Atom feed
* When the trace buffers are saved to disk?
@ 2024-11-28 19:17 Adel Belkhiri
  2024-11-29 11:44 ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Adel Belkhiri @ 2024-11-28 19:17 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi all,

Recently, while tracing applications from the apps and examples
directories, I became confused about when the trace buffer is written to
disk. Is the trace data saved only when rte_save_trace() is called, or does
it also automatically save when the buffer becomes full?

From my understanding, rte_save_trace() is invoked when the application
executes rte_eal_cleanup(). Does this mean the target application needs to
explicitly support tracing by calling rte_save_trace()—perhaps at regular
intervals—to dump the trace buffer to disk? Otherwise, will we only get a
fragment of the trace saved during rte_eal_cleanup() execution?

Thank you for clarifying this point.

Best,
Adel

[-- Attachment #2: Type: text/html, Size: 742 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When the trace buffers are saved to disk?
  2024-11-28 19:17 When the trace buffers are saved to disk? Adel Belkhiri
@ 2024-11-29 11:44 ` Thomas Monjalon
  2024-11-29 20:39   ` Adel Belkhiri
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2024-11-29 11:44 UTC (permalink / raw)
  To: Adel Belkhiri; +Cc: dev, jerinj, skori

28/11/2024 20:17, Adel Belkhiri:
> Hi all,
> 
> Recently, while tracing applications from the apps and examples
> directories, I became confused about when the trace buffer is written to
> disk. Is the trace data saved only when rte_save_trace() is called, or does

It is rte_trace_save()

> it also automatically save when the buffer becomes full?

No, DPDK is not doing such thing without user agreement.

> From my understanding, rte_save_trace() is invoked when the application
> executes rte_eal_cleanup(). Does this mean the target application needs to
> explicitly support tracing by calling rte_save_trace()—perhaps at regular
> intervals—to dump the trace buffer to disk? Otherwise, will we only get a
> fragment of the trace saved during rte_eal_cleanup() execution?

Yes you get it right.

> Thank you for clarifying this point.

Thanks for asking.

If you think the doc below is not clear enough,
do not hesitate to submit a patch to make the doc better:

	https://doc.dpdk.org/guides/prog_guide/trace_lib.html




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When the trace buffers are saved to disk?
  2024-11-29 11:44 ` Thomas Monjalon
@ 2024-11-29 20:39   ` Adel Belkhiri
  2024-11-29 21:23     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Adel Belkhiri @ 2024-11-29 20:39 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, jerinj, skori

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

Thank you for the clarification, Thomas. Indeed, the documentation for the
trace library is kind of limited. If you don't mind, I have another
question: Would it be useful to have an API to register a callback (to save
trace data) when the buffer is full?

On Fri, Nov 29, 2024 at 6:44 AM Thomas Monjalon <thomas@monjalon.net> wrote:

> 28/11/2024 20:17, Adel Belkhiri:
> > Hi all,
> >
> > Recently, while tracing applications from the apps and examples
> > directories, I became confused about when the trace buffer is written to
> > disk. Is the trace data saved only when rte_save_trace() is called, or
> does
>
> It is rte_trace_save()
>
> > it also automatically save when the buffer becomes full?
>
> No, DPDK is not doing such thing without user agreement.
>
> > From my understanding, rte_save_trace() is invoked when the application
> > executes rte_eal_cleanup(). Does this mean the target application needs
> to
> > explicitly support tracing by calling rte_save_trace()—perhaps at regular
> > intervals—to dump the trace buffer to disk? Otherwise, will we only get a
> > fragment of the trace saved during rte_eal_cleanup() execution?
>
> Yes you get it right.
>
> > Thank you for clarifying this point.
>
> Thanks for asking.
>
> If you think the doc below is not clear enough,
> do not hesitate to submit a patch to make the doc better:
>
>         https://doc.dpdk.org/guides/prog_guide/trace_lib.html
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1981 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When the trace buffers are saved to disk?
  2024-11-29 20:39   ` Adel Belkhiri
@ 2024-11-29 21:23     ` Thomas Monjalon
  2024-11-29 21:24       ` Adel Belkhiri
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2024-11-29 21:23 UTC (permalink / raw)
  To: Adel Belkhiri; +Cc: dev, jerinj, skori

29/11/2024 21:39, Adel Belkhiri:
> Thank you for the clarification, Thomas. Indeed, the documentation for the
> trace library is kind of limited. If you don't mind, I have another
> question: Would it be useful to have an API to register a callback (to save
> trace data) when the buffer is full?

I suppose yes, the problem being which thread is running file writing.

I leave it to the maintainers of the trace library.


> On Fri, Nov 29, 2024 at 6:44 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > 28/11/2024 20:17, Adel Belkhiri:
> > > Hi all,
> > >
> > > Recently, while tracing applications from the apps and examples
> > > directories, I became confused about when the trace buffer is written to
> > > disk. Is the trace data saved only when rte_save_trace() is called, or
> > does
> >
> > It is rte_trace_save()
> >
> > > it also automatically save when the buffer becomes full?
> >
> > No, DPDK is not doing such thing without user agreement.
> >
> > > From my understanding, rte_save_trace() is invoked when the application
> > > executes rte_eal_cleanup(). Does this mean the target application needs
> > to
> > > explicitly support tracing by calling rte_save_trace()—perhaps at regular
> > > intervals—to dump the trace buffer to disk? Otherwise, will we only get a
> > > fragment of the trace saved during rte_eal_cleanup() execution?
> >
> > Yes you get it right.
> >
> > > Thank you for clarifying this point.
> >
> > Thanks for asking.
> >
> > If you think the doc below is not clear enough,
> > do not hesitate to submit a patch to make the doc better:
> >
> >         https://doc.dpdk.org/guides/prog_guide/trace_lib.html




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When the trace buffers are saved to disk?
  2024-11-29 21:23     ` Thomas Monjalon
@ 2024-11-29 21:24       ` Adel Belkhiri
  0 siblings, 0 replies; 5+ messages in thread
From: Adel Belkhiri @ 2024-11-29 21:24 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, jerinj, skori

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

Thank you for your answer.

On Fri, Nov 29, 2024 at 4:23 PM Thomas Monjalon <thomas@monjalon.net> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2726 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-29 21:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-28 19:17 When the trace buffers are saved to disk? Adel Belkhiri
2024-11-29 11:44 ` Thomas Monjalon
2024-11-29 20:39   ` Adel Belkhiri
2024-11-29 21:23     ` Thomas Monjalon
2024-11-29 21:24       ` Adel Belkhiri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).