<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thank you Ekaterina! in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117649#M16306</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;Ekaterina!&lt;/P&gt;

&lt;P&gt;I am not too familiar with&amp;nbsp;GDB so it took me a while to write and debug my&amp;nbsp;GDB script. It works for me now.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 23 Dec 2015 16:07:00 GMT</pubDate>
    <dc:creator>Po-yen_C_Intel</dc:creator>
    <dc:date>2015-12-23T16:07:00Z</dc:date>
    <item>
      <title>Collect arguments for a certain function call</title>
      <link>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117647#M16304</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am analyze my workload which has a very hot function. I wonder if I can use Vtune to report what arguments are passed into this function? For example, if I have a function func() take one character as an input,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;argument "a" : 10 times&lt;/P&gt;

&lt;P&gt;argument "b" : 100 times&lt;/P&gt;

&lt;P&gt;argument "c": 50 times&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I try to google the answer but there seems to be no such solution, no matter in Vtune or other tools.The problem is I want to do this without changing the source code.&lt;/P&gt;

&lt;P&gt;Thank you very much&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 00:56:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117647#M16304</guid>
      <dc:creator>Po-yen_C_Intel</dc:creator>
      <dc:date>2015-12-22T00:56:39Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117648#M16305</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;VTune doesn't provide such capabilities.&lt;/P&gt;

&lt;P&gt;It sounds more like an automated debugging which can be done via GDB scripts.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;See examples here:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;A href="http://stackoverflow.com/questions/10748501/what-are-the-best-ways-to-automate-a-gdb-debugging-session" target="_blank"&gt;http://stackoverflow.com/questions/10748501/what-are-the-best-ways-to-automate-a-gdb-debugging-session&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;A very simple gdb&amp;nbsp;&lt;EM&gt;script&lt;/EM&gt;&amp;nbsp;file reporting all &lt;EM&gt;func &lt;/EM&gt;invocations with arguments&amp;nbsp;might look as below:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;set width 0
set height 0
set verbose off
start  # runs to main, so shared libraries are loaded

break func
commands 2
  cont
end

run
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Then it can be run via GDB as:&lt;/P&gt;

&lt;P&gt;&amp;gt;gdb --batch --command=./script --args &lt;EM&gt;&amp;lt;your workload&amp;gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Then you can &lt;EM&gt;grep -c &lt;/EM&gt;the output&amp;nbsp;to count&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;number of particular argument values.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Regards,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Katya&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 09:48:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117648#M16305</guid>
      <dc:creator>Ekaterina_L_Intel</dc:creator>
      <dc:date>2015-12-22T09:48:26Z</dc:date>
    </item>
    <item>
      <title>Thank you Ekaterina!</title>
      <link>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117649#M16306</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;Ekaterina!&lt;/P&gt;

&lt;P&gt;I am not too familiar with&amp;nbsp;GDB so it took me a while to write and debug my&amp;nbsp;GDB script. It works for me now.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 16:07:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Collect-arguments-for-a-certain-function-call/m-p/1117649#M16306</guid>
      <dc:creator>Po-yen_C_Intel</dc:creator>
      <dc:date>2015-12-23T16:07:00Z</dc:date>
    </item>
  </channel>
</rss>

