DPDK-dev Archive mirror
 help / color / mirror / Atom feed
From: NAGENDRA BALAGANI <nagendra.balagani@oracle.com>
To: "dev@dpdk.org" <dev@dpdk.org>, "jerinj@marvel.com" <jerinj@marvel.com>
Cc: Kapil Kumar Jain <kapil.k.jain@oracle.com>,
	Ramakamesh Duvvuri <kamesh.duvvuri@oracle.com>
Subject: Queries on DPDK Trace Library usage
Date: Tue, 30 Apr 2024 15:01:10 +0000	[thread overview]
Message-ID: <DM6PR10MB412433B99D325702745D584C961A2@DM6PR10MB4124.namprd10.prod.outlook.com> (raw)

[-- 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 --]

             reply	other threads:[~2024-04-30 15:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 15:01 NAGENDRA BALAGANI [this message]
2024-05-06  8:30 ` Queries on DPDK Trace Library usage Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR10MB412433B99D325702745D584C961A2@DM6PR10MB4124.namprd10.prod.outlook.com \
    --to=nagendra.balagani@oracle.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvel.com \
    --cc=kamesh.duvvuri@oracle.com \
    --cc=kapil.k.jain@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).