<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:377511209;
        mso-list-type:hybrid;
        mso-list-template-ids:-132767200 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Team / Jerin,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to use DPDK Trace Library functionality in my DPDK application.  I've successfully observed the trace files being generated by invoking
<code><b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">rte_trace_save()</span></b></code><b>,</b> particularly when utilizing the EAL option
<b>'--trace=.*'<o:p></o:p></b></p>
<p class="MsoNormal"><br>
I found following statement in the programmer guide,<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><i><span style="color:#0070C0">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.<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span style="color:#0070C0">For non lcore threads, the trace memory is allocated on the first trace emission.<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span style="color:#0070C0">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<b>, <span style="background:yellow;mso-highlight:yellow">when trace points are enabled later in the life of the application</span></b>, the behavior is the same as non lcore threads and the trace memory is allocated on the first trace emission.<o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">I attempted to enable trace points at runtime using the <b>'rte_trace_regexp("lib.mempool.*", true)</b>' 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 <b>rte_trace_save().</b><br>
<br>
When adding a new trace point in my application code as per the documentation, I used
<b>rte_trace_regexp("myapp.trace.test", true)</b> to enable it. However, I encountered a failure when attempting to look up the API.<o:p></o:p></p>
<p class="MsoNormal"><br>
Apr 22 09:53:07.486 [USDP] [DPDK] EAL: <b>rte_trace_regexp():207</b> NAG1:inside rte_trace_regexp<o:p></o:p></p>
<p class="MsoNormal">Apr 22 09:53:07.486 [USDP] [DPDK] EAL: <b>rte_trace_regexp():212</b> NAG2:inside rte_trace_regexp<o:p></o:p></p>
<p class="MsoNormal">Apr 22 09:53:07.486 [USDP] [DPDK] EAL: <b>rte_trace_regexp():231</b> NAG4:inside rte_trace_regexp<o:p></o:p></p>
<p class="MsoNormal">Apr 22 09:53:07.486 [USDP] ***NAG***: DPDK-TRACE:rte_trace_regexp failed<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">I have the following queries,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>How to enable/disable the trace files runtime in a dpdk application?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>How to trigger new trace points added in the application code?<o:p></o:p></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<br>
Nagendra<o:p></o:p></p>
</div>
</body>
</html>