<?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 Hi Min: in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936808#M7369</link>
    <description>&lt;P&gt;Hi Min:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I'm not sure I totally understand your question, but...the &lt;STRONG&gt;rdtsc&lt;/STRONG&gt; instruction is how you get the processor timestamp counter value. &amp;nbsp;It is an assembly instruction, so you would need to build a library and call the routine from .NET code. &amp;nbsp;You won't be able to simply map it to the VTune Amplifier timeline, however. &amp;nbsp;Amplifier does not use the raw value. &amp;nbsp;I think it starts from 'zero' for every collection.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;There is already an API to insert a "marker" in the timeline. &amp;nbsp;When you talk about tasks and worker threads, what threading model are you using?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Finally, you might check out the "Import CSV data" and "custom collectors" topics in the product documentation. &amp;nbsp;You can overlay data collected outside of the tool, if you comply with the data requirements.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2014 22:18:51 GMT</pubDate>
    <dc:creator>David_A_Intel1</dc:creator>
    <dc:date>2014-03-04T22:18:51Z</dc:date>
    <item>
      <title>VTune timestamp api</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936807#M7368</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I would like a function that would provide me the timestamp vTune uses in its timeline, so that any program trace/output can be tagged with this timestamp for a more comprehensive analysis (e.g.., I would like to know how many tasks a worker thread still have at a particular timestamp in the vtune timeline view)..&lt;/P&gt;

&lt;P&gt;This function does not appear to be available in the current vtuneapi dll.&amp;nbsp; Is it something that can be added, or can you show me now to get the equivalent value for the CPU ticks (preferred over OS ticks since more accurate)&amp;nbsp; in .NET code?&amp;nbsp;&amp;nbsp; I have looked other .NET forums on accurate timestamp function but there doesn't seem to have any correlation with vTune:&lt;/P&gt;

&lt;P&gt;1)&amp;nbsp; DateTime.Now is inaccurate (15 ms update cycle)&lt;/P&gt;

&lt;P&gt;2)&amp;nbsp; StopWatch will drift&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 21:13:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936807#M7368</guid>
      <dc:creator>Min_Xu</dc:creator>
      <dc:date>2014-03-04T21:13:23Z</dc:date>
    </item>
    <item>
      <title>Hi Min:</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936808#M7369</link>
      <description>&lt;P&gt;Hi Min:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I'm not sure I totally understand your question, but...the &lt;STRONG&gt;rdtsc&lt;/STRONG&gt; instruction is how you get the processor timestamp counter value. &amp;nbsp;It is an assembly instruction, so you would need to build a library and call the routine from .NET code. &amp;nbsp;You won't be able to simply map it to the VTune Amplifier timeline, however. &amp;nbsp;Amplifier does not use the raw value. &amp;nbsp;I think it starts from 'zero' for every collection.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;There is already an API to insert a "marker" in the timeline. &amp;nbsp;When you talk about tasks and worker threads, what threading model are you using?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Finally, you might check out the "Import CSV data" and "custom collectors" topics in the product documentation. &amp;nbsp;You can overlay data collected outside of the tool, if you comply with the data requirements.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 22:18:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936808#M7369</guid>
      <dc:creator>David_A_Intel1</dc:creator>
      <dc:date>2014-03-04T22:18:51Z</dc:date>
    </item>
    <item>
      <title>Hi</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936809#M7370</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I believe vTune sets the Elapsed time to 0 when launching the application, but the CPU Timestamp and the OS Timestamp (in the Show timescale as) appear to have an origin way earlier than when the application is launched.&amp;nbsp; Would like a function to give a value in the same scale and origin, so that I can correlate "Tasks and Frames" chart to trace (file log) output&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I am using standard .NET threads for Worker threads, with various tasks that have various affinity and dependency requirements, so would like a more comprehensive analysis.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 23:36:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936809#M7370</guid>
      <dc:creator>Min_Xu</dc:creator>
      <dc:date>2014-03-04T23:36:23Z</dc:date>
    </item>
    <item>
      <title>&gt; There is already an API to</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936810#M7371</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;There is already an API to insert a "marker" in the timeline...&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Arial, Helvetica, sans-serif"&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Mr.Anderson is right! You can refer to ittnotify.h - I provided the usage in this &lt;A href="http://software.intel.com/zh-cn/blogs/2011/03/24/400006948/"&gt;article&lt;/A&gt;, sorry this was written in Chinese but example code can be referred...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Arial, Helvetica, sans-serif"&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;See the picture in the article, all your marked time range (on threads) will be displayed in timeline report. You can select specific time-range, then do "Zoom-in and Filter by Selection" to generate a new report, you may use "Thread / Function / Call stack" as view point, so you will see your interest of function (time stamp, elapsed) under specific thread, in bottom-up report.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 03:40:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936810#M7371</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2014-03-05T03:40:46Z</dc:date>
    </item>
    <item>
      <title>@Min xu</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936811#M7372</link>
      <description>&lt;P&gt;@Min xu&lt;/P&gt;

&lt;P&gt;You can add compiler intrinsinc __rdtsc() which will save you from little bit of assembly coding.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 07:05:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936811#M7372</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2014-03-05T07:05:15Z</dc:date>
    </item>
    <item>
      <title>Hi Peter</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936812#M7373</link>
      <description>&lt;P&gt;Hi Peter&lt;/P&gt;

&lt;P&gt;A time marker is not enough.&amp;nbsp; I need to have different transaction identified, and most important of all, I need the count of various queues (common, priority, private etc etc) indicated.&amp;nbsp; I also need other information such as type of task the worker is performing (which would indicate its requirement for exclusive access).&amp;nbsp; Time marker unfortunately is not enough.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;iliyapolak:&lt;/P&gt;

&lt;P&gt;Is that the value that the vTune is displaying for CPU timestamp, would the read out value correlate to vTune's timescale on the "Tasks and Frames" graph?&amp;nbsp; Should I worry about the different cores having the same time origin and cpu speedstep etc etc?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 18:47:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936812#M7373</guid>
      <dc:creator>Min_Xu</dc:creator>
      <dc:date>2014-03-05T18:47:01Z</dc:date>
    </item>
    <item>
      <title>Do you refer to rdtsc</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936813#M7374</link>
      <description>&lt;P&gt;Do you refer to rdtsc instruction?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 18:51:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936813#M7374</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2014-03-05T18:51:16Z</dc:date>
    </item>
    <item>
      <title>iliyapolak</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936814#M7375</link>
      <description>&lt;P&gt;iliyapolak&lt;/P&gt;

&lt;P&gt;Yes, you were discussing the rdtsc instruction.&lt;/P&gt;

&lt;P&gt;Is the value from this instruction what vTune displays for CPU timestamp?&amp;nbsp; Should I worry about the different cores having the same time origin and cpu speedstep etc etc?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 20:02:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936814#M7375</guid>
      <dc:creator>Min_Xu</dc:creator>
      <dc:date>2014-03-05T20:02:46Z</dc:date>
    </item>
    <item>
      <title>I think that Mr.Anderson gave</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936815#M7376</link>
      <description>&lt;P&gt;I think that Mr.Anderson gave an answer regarding time measurement of VTune.&lt;/P&gt;

&lt;P&gt;Now regarding the performance issues related to rdtsc please follow these links:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://software.intel.com/en-us/forums/topic/288625" target="_blank"&gt;http://software.intel.com/en-us/forums/topic/288625&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://software.intel.com/en-us/forums/topic/335541" target="_blank"&gt;http://software.intel.com/en-us/forums/topic/335541&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://software.intel.com/en-us/forums/topic/306222" target="_blank"&gt;http://software.intel.com/en-us/forums/topic/306222&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 21:16:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936815#M7376</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2014-03-05T21:16:45Z</dc:date>
    </item>
    <item>
      <title>Since establishing the cpu</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936816#M7377</link>
      <description>Since establishing the cpu tsc count per core to the application timeline as displayed by vTune is extremely hard, I chose to use .NET  System.Diagnostics.Process.GetCurrentProcess().StartTime  as the application starting time, and use   DateTime.Now.Subtract(starttime).TotalMilliseconds  to log the timestamp in a file, and manually adjust (given a known event in both log file and in the vTune Tasks and Frames view) to match up.  However, when calling Writeline / String.Format on this double value (double precision decimal), the output fractional millisecond portion is completely useless, as the   .1 and .01 position of the fractional part is almost always in sync with the 1000 and 100 integral portion, respectively.</description>
      <pubDate>Thu, 13 Mar 2014 22:15:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936816#M7377</guid>
      <dc:creator>Min_Xu</dc:creator>
      <dc:date>2014-03-13T22:15:24Z</dc:date>
    </item>
    <item>
      <title>Let's talk back to VTune</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936817#M7378</link>
      <description>&lt;P&gt;Let's talk back to VTune Amplifier. I don't know if I can address your requirements...however you can try:&lt;/P&gt;

&lt;P&gt;Using advanced-hotspots to profiling your app-&amp;gt;View bottom-up report-&amp;gt;select "grouping" as "Thread \ Function \ Callstack"-&amp;gt;Change viewpoint to "Hardware Event Counts". This will display time by CPU clocks on each function of each thread. It's better than using __rdtsc() without inserting code.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 00:17:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936817#M7378</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2014-03-14T00:17:39Z</dc:date>
    </item>
    <item>
      <title>BTW @Min Xu, the "Creating a</title>
      <link>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936818#M7379</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;BTW @Min Xu, the "&lt;/SPAN&gt;&lt;A href="http://software.intel.com/en-us/node/496523"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Creating a &lt;/SPAN&gt;&lt;FONT color="#ffffff" style="font-size: 1em; line-height: 1.5; background-color: rgb(51, 153, 255);"&gt;CSV&lt;/FONT&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt; File with External Data&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;" topic in the VTune Amplifier XE product documentation shows you how to format the CSV file, including specifying whether the data is from QueryPerformanceCounter, rdtsc, or others. &amp;nbsp;Since your code is .NET, I would suspect that using QueryPerformanceCounter would be the easiest to access.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;So, it's not so much about tagging program output with the VTune Amplifier XE timestamp as it is correlating the program output with the VTune Amplifier XE data, right? &amp;nbsp;Importing the data and specifying the clock source will allow VTune Amplifier XE to do that.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2014 17:11:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/VTune-timestamp-api/m-p/936818#M7379</guid>
      <dc:creator>David_A_Intel1</dc:creator>
      <dc:date>2014-03-17T17:11:04Z</dc:date>
    </item>
  </channel>
</rss>

