DPDK patches and discussions
 help / color / mirror / Atom feed
* Queries on DPDK Trace Library usage
@ 2024-04-30 15:01 NAGENDRA BALAGANI
  2024-05-06  8:30 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: NAGENDRA BALAGANI @ 2024-04-30 15:01 UTC (permalink / raw)
  To: dev, jerinj; +Cc: Kapil Kumar Jain, Ramakamesh Duvvuri

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

Hi Team / Jerin,

I am trying to use DPDK Trace Library functionality in my DPDK application.  I've successfully observed the trace files being generated by invoking rte_trace_save(), particularly when utilizing the EAL option '--trace=.*'

I found following statement in the programmer guide,

The trace memory will be allocated through an internal function __rte_trace_mem_per_thread_alloc(). The trace memory will be allocated per thread to enable lock less trace-emit function.
For non lcore threads, the trace memory is allocated on the first trace emission.
For lcore threads, if trace points are enabled through a EAL option, the trace memory is allocated when the threads are known of DPDK (rte_eal_init for EAL lcores, rte_thread_register for non-EAL lcores). Otherwise, when trace points are enabled later in the life of the application, the behavior is the same as non lcore threads and the trace memory is allocated on the first trace emission.
I attempted to enable trace points at runtime using the 'rte_trace_regexp("lib.mempool.*", true)' API, though I'm unsure if this is the correct approach. While the call appears to succeed, I'm puzzled by the absence of any trace files being generated even after invoking rte_trace_save().

When adding a new trace point in my application code as per the documentation, I used rte_trace_regexp("myapp.trace.test", true) to enable it. However, I encountered a failure when attempting to look up the API.

Apr 22 09:53:07.486 [USDP] [DPDK] EAL: rte_trace_regexp():207 NAG1:inside rte_trace_regexp
Apr 22 09:53:07.486 [USDP] [DPDK] EAL: rte_trace_regexp():212 NAG2:inside rte_trace_regexp
Apr 22 09:53:07.486 [USDP] [DPDK] EAL: rte_trace_regexp():231 NAG4:inside rte_trace_regexp
Apr 22 09:53:07.486 [USDP] ***NAG***: DPDK-TRACE:rte_trace_regexp failed

I have the following queries,


1.       How to enable/disable the trace files runtime in a dpdk application?

2.       How to trigger new trace points added in the application code?

Regards,
Nagendra

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

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

* Re: Queries on DPDK Trace Library usage
  2024-04-30 15:01 Queries on DPDK Trace Library usage NAGENDRA BALAGANI
@ 2024-05-06  8:30 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2024-05-06  8:30 UTC (permalink / raw)
  To: NAGENDRA BALAGANI; +Cc: dev, jerinj, Kapil Kumar Jain, Ramakamesh Duvvuri

On Tue, Apr 30, 2024 at 8:31 PM NAGENDRA BALAGANI
<nagendra.balagani@oracle.com> wrote:
>
> Hi Team / Jerin,
>
>
>
> I am trying to use DPDK Trace Library functionality in my DPDK application.  I've successfully observed the trace files being generated by invoking rte_trace_save(), particularly when utilizing the EAL option '--trace=.*'

>
> I have the following queries,
>
>
>
> 1.       How to enable/disable the trace files runtime in a dpdk application?


 rte_trace_point_enable() and rte_trace_point_disable()

>
> 2.       How to trigger new trace points added in the application code?


See app/test/test_trace.c test code for (1) and (2).


>
>
>
> Regards,
> Nagendra

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

end of thread, other threads:[~2024-05-06  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30 15:01 Queries on DPDK Trace Library usage NAGENDRA BALAGANI
2024-05-06  8:30 ` Jerin Jacob

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).