<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:22:12 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-8980] Add tracepoint support to Lustre</title>
                <link>https://jira.whamcloud.com/browse/LU-8980</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;One of the major obstacles to the movement of the upstream client out of staging is our debug logging system. The libcfs debugging infrastructure was developed long before trace point existed.&lt;br/&gt;
Today trace point + perf can provide far more functionally than what is offered by lctl debug. This ticket covers the work need to implement this functionality.&lt;/p&gt;</description>
                <environment></environment>
        <key id="42674">LU-8980</key>
            <summary>Add tracepoint support to Lustre</summary>
                <type id="7" iconUrl="https://jira.whamcloud.com/images/icons/issuetypes/task_agile.png">Technical task</type>
                            <parent id="46758">LU-9679</parent>
                                    <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</priority>
                        <status id="4" iconUrl="https://jira.whamcloud.com/images/icons/statuses/reopened.png" description="This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.">Reopened</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="simmonsja">James A Simmons</assignee>
                                    <reporter username="simmonsja">James A Simmons</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Dec 2016 23:21:17 +0000</created>
                <updated>Sat, 28 Oct 2023 19:49:26 +0000</updated>
                                            <version>Lustre 2.10.0</version>
                                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>2</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="179150" author="simmonsja" created="Wed, 28 Dec 2016 23:31:56 +0000"  >&lt;p&gt;I do have a first patch but I need to add the event filtering base on the debug flags. Here is the sample output I&apos;m seeing.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;# tracer: nop
#
# entries-in-buffer/entries-written: 2121/11382   #P:8
#
#                              _-----=&amp;gt; irqs-off
#                             / _----=&amp;gt; need-resched
#                            | / _---=&amp;gt; hardirq/softirq
#                            || / _--=&amp;gt; preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
modprobe-10993 [007] ....  6584.386683: lnet_config: (linux-crypto.c:377:cfs_crypto_performance_test) Crypto hash algorithm crc32 speed = 1427 MB/s
.....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="179263" author="gerrit" created="Fri, 30 Dec 2016 23:42:03 +0000"  >&lt;p&gt;James Simmons (uja.ornl@yahoo.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/24554&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/24554&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8980&quot; title=&quot;Add tracepoint support to Lustre&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8980&quot;&gt;LU-8980&lt;/a&gt; libcfs: add tracepoint support for libcfs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: cd9d0fcbeddb0a0a00b58251bc315aff9b92ef39&lt;/p&gt;</comment>
                            <comment id="179267" author="simmonsja" created="Sat, 31 Dec 2016 00:05:27 +0000"  >&lt;p&gt;Also have llite in the works. Here is the output I have so far.&lt;/p&gt;

&lt;p&gt;kworker/u17:2-5181 &lt;span class=&quot;error&quot;&gt;&amp;#91;001&amp;#93;&lt;/span&gt; .... 2135.478773: llite_vfstrace: (vvp_io.c:306:vvp_io_fini) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200005222:0x13a4:0x0&amp;#93;&lt;/span&gt; ignore/verify layout 0/0, layout version 0 restore needed 0&lt;/p&gt;

&lt;p&gt;sendfile_groupl-23957 &lt;span class=&quot;error&quot;&gt;&amp;#91;002&amp;#93;&lt;/span&gt; .... 2135.480731: llite_vfstrace: (file.c:3992:ll_layout_conf) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200005222:0x13a4:0x0&amp;#93;&lt;/span&gt;: layout version change: 0 -&amp;gt; 0&lt;/p&gt;</comment>
                            <comment id="179278" author="gerrit" created="Sat, 31 Dec 2016 17:56:42 +0000"  >&lt;p&gt;James Simmons (uja.ornl@yahoo.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/24560&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/24560&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8980&quot; title=&quot;Add tracepoint support to Lustre&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8980&quot;&gt;LU-8980&lt;/a&gt; llite: add tracepoint support for llite layer&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7fffac5a94243a03d92381cfd82340188d66684c&lt;/p&gt;</comment>
                            <comment id="181488" author="simmonsja" created="Thu, 19 Jan 2017 19:44:55 +0000"  >&lt;p&gt;Just pushed a version of tracepoint that handles printing messages to the console. Most of the infrastructure is now in place. Only a few issues to resolve.&lt;/p&gt;

&lt;p&gt;1) Currently ratelimting is per module. For the lustre debugging code it has a individual rate limit for every single message. I doubt that &#160; &#160; &#160; would be acceptable upstream.&lt;/p&gt;

&lt;p&gt;2) Need to fine tune the printk rate limiting based on module parameters in libcfs.&lt;/p&gt;

&lt;p&gt;3) Some of the debug message mask are conditional i.e &quot;CDEBUG(warn ? D_WARNING : D_INFO&quot;. Might need to create special &#160; &#160; &#160; &#160; &#160; &#160; &#160; macros for this. Haven&apos;t figured a clean solution. Another option is break it up into two separate trace events.&lt;/p&gt;

&lt;p&gt;For the most part its ready for review. Peter who would be good choices to look at this work?&lt;/p&gt;</comment>
                            <comment id="183757" author="dmiter" created="Tue, 7 Feb 2017 15:05:06 +0000"  >&lt;p&gt;James,&lt;/p&gt;

&lt;p&gt;This is not I expected to see when I vote for this feature. I expect to see correct function name in &quot;FUNCTION&quot; field instead of category like &quot;lnet_info&quot;.&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# tracer: nop
#
# entries-in-buffer/entries-written: 58/61   #P:4
#
#                              _-----=&amp;gt; irqs-off
#                             / _----=&amp;gt; need-resched
#                            | / _---=&amp;gt; hardirq/softirq
#                            || / _--=&amp;gt; preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
      ldlm_bl_01-15147 [003] .... 189369.402891: lnet_info: (linux-crypto.c:119:cfs_crypto_hash_alloc) Using crypto hash: adler32 (adler32-zlib) speed 2454 MB/s

 ll_ost_io00_002-15366 [001] .... 189369.403051: lnet_info: (linux-crypto.c:119:cfs_crypto_hash_alloc) Using crypto hash: adler32 (adler32-zlib) speed 2454 MB/s

##### CPU 0 buffer started ####
   ptlrpcd_00_03-14400 [000] .... 189383.834528: lnet_info: (linux-crypto.c:119:cfs_crypto_hash_alloc) Using crypto hash: adler32 (adler32-zlib) speed 2454 MB/s

 ll_ost_io00_002-15366 [001] .... 189383.835278: lnet_info: (linux-crypto.c:119:cfs_crypto_hash_alloc) Using crypto hash: adler32 (adler32-zlib) speed 2454 MB/s

##### CPU 2 buffer started ####
   ptlrpcd_00_01-14398 [002] .... 189383.848857: lnet_info: (linux-crypto.c:119:cfs_crypto_hash_alloc) Using crypto hash: adler32 (adler32-zlib) speed 2454 MB/s

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It would be very beneficially to be able to select appropriate function name for tracing:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# perf list | grep lnet
  lnet:lnet_config                                   [Tracepoint event]
  lnet:lnet_console                                  [Tracepoint event]
  lnet:lnet_emerg                                    [Tracepoint event]
  lnet:lnet_error                                    [Tracepoint event]
  lnet:lnet_ha                                       [Tracepoint event]
  lnet:lnet_info                                     [Tracepoint event]
  lnet:lnet_ioctl                                    [Tracepoint event]
  lnet:lnet_neterror                                 [Tracepoint event]
  lnet:lnet_other                                    [Tracepoint event]
  lnet:lnet_warning                                  [Tracepoint event]

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Right now, I can select for tracing only category instead of exact function I interested in.&lt;/p&gt;</comment>
                            <comment id="184061" author="simmonsja" created="Thu, 9 Feb 2017 01:04:37 +0000"  >&lt;p&gt;Function in this case means the name the compiler generates from the TRACE_EVENT macro. For example DEFINE_EVENT(lnet_log_msg, lnet_config, ... --&amp;gt; becomes lnet_config(...) in the source file. So they are not regular function but more like event markers. One of major goals of this project is to replace the current lctl debugging infrastructure since this is a requirement upstream. So I worked the code to map to the behavior lctl debug is doing which is category based. You will see CDEBUG(D_HA,...) maps to lnet_ha(...) etc. By the way the reason I used names like lnet_info, lnet_ioctl is to see clearly in the logs which subsys the event is showing up in. Perhaps&lt;/p&gt;

&lt;p&gt;ptlrpcd_00_01-14398 &lt;span class=&quot;error&quot;&gt;&amp;#91;002&amp;#93;&lt;/span&gt; .... 189383.848857: info: lnet:(linux-crypto.c:119:cfs_crypto_hash_alloc) Using crypto hash: ...&lt;/p&gt;

&lt;p&gt;I have to look at the logs perf creates to see if it makes sense to the user.&lt;/p&gt;

&lt;p&gt;As for limiting debugging to an exact function you can do that with filtering.&lt;br/&gt;
perf ... -filter cfs_hash_*. You can do this by module as well &quot;-filter :mod:libcfs&quot;.&lt;br/&gt;
&#160;&lt;/p&gt;</comment>
                            <comment id="184133" author="dmiter" created="Thu, 9 Feb 2017 14:53:24 +0000"  >&lt;p&gt;Unfortunately tracepoints don&apos;t allow to filter by &quot;const char *&quot; fields. I was not able to specify filter by file or function name because of it&apos;s interpreted as integer.&lt;/p&gt;

&lt;p&gt;Can we change the type to fixed array of char or dynamic array of char? I encountered that only such types allow to specify filter with&#160;wild card characters (*,?).&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="184434" author="dmiter" created="Fri, 10 Feb 2017 19:48:59 +0000"  >&lt;p&gt;This patch allow string filtering by file and function name.&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;diff --git a/libcfs/include/libcfs/libcfs_trace.h b/libcfs/include/libcfs/libcfs_trace.h
index c2aecdb..5d210cb 100644
--- a/libcfs/include/libcfs/libcfs_trace.h
+++ b/libcfs/include/libcfs/libcfs_trace.h
@@ -67,20 +67,20 @@ DECLARE_EVENT_CLASS(libcfs_log_msg,
                 struct va_format *vaf),
        TP_ARGS(msg_file, msg_line, msg_fn, vaf),
        TP_STRUCT__entry(
-               __field(const char *, msg_file)
+               __string(msg_file, msg_file ? msg_file : &quot;&amp;lt;nofile&amp;gt;&quot;)
                __field(int, msg_line)
-               __field(const char *, msg_fn)
+               __string(msg_func, msg_fn ? msg_fn : &quot;&amp;lt;nofunc&amp;gt;&quot;)
                __dynamic_array(char, msg, CFS_TRACE_CONSOLE_BUFFER_SIZE)
        ),
        TP_fast_assign(
-               __entry-&amp;gt;msg_file = msg_file;
+               __assign_str(msg_file, msg_file);
                __entry-&amp;gt;msg_line = msg_line;
-               __entry-&amp;gt;msg_fn = msg_fn;
+               __assign_str(msg_func, msg_fn);
                vsnprintf(__get_dynamic_array(msg),
                          CFS_TRACE_CONSOLE_BUFFER_SIZE, vaf-&amp;gt;fmt, *vaf-&amp;gt;va);
        ),
-       TP_printk(&quot;(%s:%d:%s) %s&quot;, __entry-&amp;gt;msg_file, __entry-&amp;gt;msg_line,
-                 __entry-&amp;gt;msg_fn, __get_str(msg))
+       TP_printk(&quot;(%s:%d:%s) %s&quot;, __get_str(msg_file), __entry-&amp;gt;msg_line,
+                 __get_str(msg_func), __get_str(msg))
 );
 
 DEFINE_EVENT(libcfs_log_msg, libcfs_config,
@@ -118,20 +118,20 @@ DECLARE_EVENT_CLASS(libcfs_log_msg_limited,
                 const char *msg_fn, struct va_format *vaf),
        TP_ARGS(rs, msg_file, msg_line, msg_fn, vaf),
        TP_STRUCT__entry(
-               __field(const char *, msg_file)
+               __string(msg_file, msg_file ? msg_file : &quot;&amp;lt;nofile&amp;gt;&quot;)
                __field(int, msg_line)
-               __field(const char *, msg_fn)
+               __string(msg_func, msg_fn ? msg_fn : &quot;&amp;lt;nofunc&amp;gt;&quot;)
                __dynamic_array(char, msg, CFS_TRACE_CONSOLE_BUFFER_SIZE)
        ),
        TP_fast_assign(
-               __entry-&amp;gt;msg_file = msg_file;
+               __assign_str(msg_file, msg_file);
                __entry-&amp;gt;msg_line = msg_line;
-               __entry-&amp;gt;msg_fn = msg_fn;
+               __assign_str(msg_func, msg_fn);
                vsnprintf(__get_dynamic_array(msg),
                          CFS_TRACE_CONSOLE_BUFFER_SIZE, vaf-&amp;gt;fmt, *vaf-&amp;gt;va);
        ),
-       TP_printk(&quot;(%s:%d:%s) %s&quot;, __entry-&amp;gt;msg_file, __entry-&amp;gt;msg_line,
-                 __entry-&amp;gt;msg_fn, __get_str(msg))
+       TP_printk(&quot;(%s:%d:%s) %s&quot;, __get_str(msg_file), __entry-&amp;gt;msg_line,
+                 __get_str(msg_func), __get_str(msg))
 );
 
 DEFINE_EVENT_CONDITION(libcfs_log_msg_limited, libcfs_console,

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Probably with this patch the implementation will be suitable enough to replace current logging system.&lt;/p&gt;</comment>
                            <comment id="184439" author="simmonsja" created="Fri, 10 Feb 2017 20:05:57 +0000"  >&lt;p&gt;Oh now I understand what you mean by your filtering. Thanks for making it clearer. BTW its really &#160;awesome to be able to filter that way.&lt;/p&gt;</comment>
                            <comment id="184617" author="simmonsja" created="Mon, 13 Feb 2017 17:14:47 +0000"  >&lt;p&gt;Dmitry how does it look to you now. BTW does anyone even know what the error codes for LCONSOLE_ERROR mean anymore?&lt;/p&gt;</comment>
                            <comment id="190279" author="simmonsja" created="Fri, 31 Mar 2017 16:12:00 +0000"  >&lt;p&gt;I pushed a new patch that has been updated and I fixed the build issue on RHEL6. Only the CERROR need to be ported but I like to have feedback on the patch before I complete &#160;the remaining work.&lt;/p&gt;</comment>
                            <comment id="190779" author="simmonsja" created="Tue, 4 Apr 2017 21:55:14 +0000"  >&lt;p&gt;It lives. I have completed a functional patch with a complete port of all the trace point events. Please give it a review.&lt;/p&gt;</comment>
                            <comment id="390976" author="gerrit" created="Sat, 28 Oct 2023 19:49:26 +0000"  >&lt;p&gt;&quot;Timothy Day &amp;lt;timday@amazon.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/52875&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/52875&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8980&quot; title=&quot;Add tracepoint support to Lustre&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8980&quot;&gt;LU-8980&lt;/a&gt; debug: redefine CDEBUG to use tracing&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7be979ac832dcafde22ca68737b4c37459dca83f&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="62856">LU-14428</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="46758">LU-9679</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="36939">LU-8145</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="34837">LU-7801</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="37297">LU-8223</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>upstream</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzyzdr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>