<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Parallel Development in Visual Studio</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/visualizeparallel/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:44:28 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Not planning any more posts on this blog</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/not-planning-any-more-posts-on-this-blog</link>
      <pubDate>Tue, 02 Jul 2013 19:34:38 GMT</pubDate>
      <dc:creator><![CDATA[DanielMoth]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2013/07/02/not-planning-any-more-posts-on-this-blog/</guid>
      <description><![CDATA[If you are subscribed to this blog, you will have noticed that things got quiet toward the end of...]]></description>
      <content:encoded><![CDATA[<p>If you are subscribed to this blog, you will have noticed that things got quiet toward the end of 2011 and then completely silent after April 2012.</p>
<p>I wanted to share with you that we are not planning any more updates to this blog beyond this last one, so feel free to unsubscribe.</p>
<p>For general news on diagnostics tools in Visual Studio we encourage you to monitor the VS Diagnostics home here: <a href="https://blogs.msdn.com/b/visualstudioalm/archive/tags/diagnostics/">https://blogs.msdn.com/b/visualstudioalm/archive/tags/diagnostics/</a>. I just posted there about the <a href="https://blogs.msdn.com/b/visualstudioalm/archive/2013/07/02/concurrency-visualizer-now-on-the-gallery-for-vs2013.aspx">Concurrency Visualizer in VS2013</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>How the Concurrency Visualizer Represents Recycled Thread IDs</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/how-the-concurrency-visualizer-represents-recycled-thread-ids</link>
      <pubDate>Tue, 10 Apr 2012 14:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Kavya Kotacherry]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2012/04/10/how-the-concurrency-visualizer-represents-recycled-thread-ids/</guid>
      <description><![CDATA[If you are profiling an application spawning hundred&rsquo;s of threads, you may see some thread IDs...]]></description>
      <content:encoded><![CDATA[<p>If you are profiling an application spawning hundred&rsquo;s of threads, you may see some thread IDs with #&lt;int&gt; suffixes in the Concurrency Visualizer. This is merely how the Concurrency Visualizer displays recycled thread IDs.&nbsp;</p>
<p>While parsing the ETW events for the process being profiled, the visualizer looks for the thread start/end events. I used <a href="https://msdn.microsoft.com/en-us/performance/cc825801.aspx">xperf</a> to drill further into the ETW events in the ETL file collected by the Concurrency Visualizer. Here are some snippets from the xperf output (a csv file listing all the events collected in the ETL log):</p>
<p>T-Start, 1144863, application1.exe ( 572), 5868, &hellip;</p>
<p>T-End, 1155571, application1.exe ( 572), 5868, &hellip;.</p>
<p>T-Start, 37311946, application1.exe ( 572), 5868, &hellip;</p>
<p>T-End, 37361583, application1.exe ( 572), 5868, &hellip;</p>
<p>Here, the T-Start and T-End represent the thread start and thread end events. You can clearly see that thread ID 5868 has been assigned to two different threads within the same process application1.exe(Process ID 572).</p>
<p>In such cases, the Concurrency Visualizer will show the threads in separate channels. To distinguish the two threads, the thread ID entry is represented as &ldquo;ThreadID#&lt;int&gt;&rdquo;, where the integer suffix is the thread ID reuse count. The thread ID may be recycled multiple times within the same process: the integer suffix is incremented for each thread instance.</p>
<p>Refer to the following Threads View screenshot in the Concurrency Visualizer:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/3884.threadsViewTidReuse_0DC26BB0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/3884.threadsViewTidReuse_5F00_0DC26BB0.png"><img style="display: inline; background-image: none;" title="threadsViewTidReuse" border="0" alt="threadsViewTidReuse" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8686.threadsViewTidReuse_thumb_2D714578.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8686.threadsViewTidReuse_5F00_thumb_5F00_2D714578.png" width="573" height="263" /></a></p>
<p>Thread IDs 5868 and 968 are being recycled. The channels with Thread ID 5868#2 and 968#2 represent the second threads reusing the same thread IDs.</p>
<p>The Cores View legend also visualizes the threads with the &ldquo;ThreadID#&lt;int&gt;&rdquo; representation. A sample view:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/3872.coresViewTidReuse_3F4DD945.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/3872.coresViewTidReuse_5F00_3F4DD945.png"><img style="display: inline; background-image: none;" title="coresViewTidReuse" border="0" alt="coresViewTidReuse" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/2308.coresViewTidReuse_thumb_382E9CCD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/2308.coresViewTidReuse_5F00_thumb_5F00_382E9CCD.png" width="573" height="248" /></a></p>
<p>Next time you bump into these weird numbers with the #2, #3.. suffixes, you know what they mean. Happy profiling!</p>]]></content:encoded>
    </item>
    <item>
      <title>Investigating unresponsive UI issues in WPF: A case study</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/investigating-unresponsive-ui-issues-in-wpf-a-case-study</link>
      <pubDate>Mon, 09 Apr 2012 17:16:00 GMT</pubDate>
      <dc:creator><![CDATA[Kavya Kotacherry]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2012/04/09/investigating-unresponsive-ui-issues-in-wpf-a-case-study/</guid>
      <description><![CDATA[I was writing a WPF based application which involved some file operations. At times, I observed that...]]></description>
      <content:encoded><![CDATA[<p>I was writing a WPF based application which involved some file operations. At times, I observed that the UI was becoming unresponsive. To investigate this issue, I used the Concurrency Visualizer tool (shipped in Visual Studio 11 Developer Preview) to view my application&rsquo;s execution patterns.</p>
<p>Note that I am using the Concurrency Visualizer SDK. This helps me quickly identify the thread and time interval corresponding to my file compress operation. For details on how to use the Concurrency Visualizer SDK to visualize events in your application, see &ldquo;<a href="https://blogs.msdn.com/b/visualizeparallel/archive/2011/10/17/introducing-the-concurrency-visualizer-sdk.aspx">Introducing the Concurrency Visualizer SDK</a>&rdquo;.</p>
<p>After profiling my application with the Concurrency Visualizer, the following facts are quite clear:</p>
<p>1. Main Thread 9160, which happens to be the UI thread, is spending most of it &lsquo;s time in Execution.</p>
<p>2. No UI processing is happening during the Compress file operation.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/7128.image_5BC27BAC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/7128.image_5F00_5BC27BAC.png"><img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8688.image_thumb_3FB1BCC1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8688.image_5F00_thumb_5F00_3FB1BCC1.png" width="630" height="239" /></a></p>
<p>During directed testing, this was fine for small files. As file sizes grew compression became a substantial overhead for the UI thread to handle. What this means is that I need to delegate the job of compression to another thread so that the UI thread could remain responsive during compression. This is a good opportunity to try out the new&nbsp; .<a href="https://www.microsoft.com/download/en/details.aspx?id=9983">Net 4.5 Async features</a>.</p>
<p>I quickly moved the compression job onto the ThreadPool using Task.Run. I also changed the Button_Click handler to an async handler, and I await the compression task in Button_Click. When Button_Click gets to the first await, control returns to the caller, thus unblocking the UI thread.</p>
<pre class="csharpcode"><span style="color: #0000ff;" class="kwrd">private</span> async <span style="color: #0000ff;" class="kwrd">void</span> Button_Click(<span style="color: #0000ff;" class="kwrd">object</span> sender, RoutedEventArgs e)
{
    await Task.Run(() =&gt;
    {
        <span style="color: #008000;" class="rem">// actual Compress code goes here </span>
    });

    <span style="color: #008000;"><span class="rem">//</span> <span class="rem">// code to run post Compress</span> <span class="rem">//</span> </span>}</pre>
<p>Now with this small change, I see that the issue is resolved and I don&rsquo;t see any unresponsive UI in my application. To confirm this, let us look at the Concurrency Visualizer output:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/1325.image_667FD301.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/1325.image_5F00_667FD301.png"><img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8787.image_thumb_745218FC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8787.image_5F00_thumb_5F00_745218FC.png" width="630" height="286" /></a></p>
<p>1. One can clearly see that the Main Thread 4896 is busy with UI processing&nbsp; cycles.</p>
<p>2. Worker Thread 6496 is actually performing the compress operation.</p>
<p>3. Visible Timeline Profile shows that app is spending 50% of the time in UI processing, as opposed to 17% from the first attempt.</p>
<p>You might be wondering about the System.Threading.Tasks markers in the Concurrency Visualizer output. These are from the await and Task.Run operations. They are not enabled by default. To collect the markers for asynchronous operations under System.Threading.Tasks, one needs to change the marker provider level. Goto Visual Studio &ndash;&gt; Analyze &ndash;&gt; Concurrency Visualizer &ndash;&gt; Advanced Settings &ndash;&gt; Markers tab.</p>
<p>Select the System.Threading.Tasks provider and click the edit provider icon <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/1016.image_3ED956D7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/1016.image_5F00_3ED956D7.png"><img style="border-width: 0px; margin: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/2425.image_thumb_33AFCC8D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/2425.image_5F00_thumb_5F00_33AFCC8D.png" width="33" height="26" /></a>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8875.image_65A76D17.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8875.image_5F00_65A76D17.png"><img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/3808.image_thumb_0C758358.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/3808.image_5F00_thumb_5F00_0C758358.png" width="629" height="475" /></a></p>
<p>Set the &ldquo;Collect events with this importance level and greater&rdquo; to &ldquo;<em>Low</em>&rdquo; as shown in the above screenshot. Rerun your application and collect the trace. The Concurrency Visualizer will visualize the System.Threading.Tasks events as markers !!</p>
<p>However, please note that the individual task events can be verbose and cause performance problems. So users should apply some caution when opting to collect these events.</p>]]></content:encoded>
    </item>
    <item>
      <title>Analyzing C++ AMP Code with the Concurrency Visualizer</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/analyzing-c-amp-code-with-the-concurrency-visualizer</link>
      <pubDate>Fri, 09 Mar 2012 10:51:00 GMT</pubDate>
      <dc:creator><![CDATA[James Rapp]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2012/03/09/analyzing-c-amp-code-with-the-concurrency-visualizer/</guid>
      <description><![CDATA[The Concurrency Visualizer provides information to help developers make sense of C++ AMP...]]></description>
      <content:encoded><![CDATA[<p>The Concurrency Visualizer provides information to help developers make sense of C++ AMP applications.&nbsp; I wrote an <a href="https://blogs.msdn.com/b/nativeconcurrency/archive/2012/03/09/analyzing-c-amp-code-with-the-concurrency-visualizer.aspx">entry about this</a> and posted it on the Native Concurrency blog.&nbsp; If you are a C++ AMP developer, I recommend checking it out.</p>
<p><span color="#a5a5a5" style="color: #a5a5a5;">James Rapp</span></p>]]></content:encoded>
    </item>
    <item>
      <title>I’ve deployed CVCollectionCmd. How can I Visualize the Traces I Collected?</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/ive-deployed-cvcollectioncmd-how-can-i-visualize-the-traces-i-collected</link>
      <pubDate>Sun, 04 Mar 2012 10:33:00 GMT</pubDate>
      <dc:creator><![CDATA[James Rapp]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2012/03/04/ive-deployed-cvcollectioncmd-how-can-i-visualize-the-traces-i-collected/</guid>
      <description><![CDATA[Chances are that you deployed CVCollectionCmd on a machine without Visual Studio 11 in order to...]]></description>
      <content:encoded><![CDATA[<p>Chances are that you deployed <a href="https://blogs.msdn.com/b/visualizeparallel/archive/2012/03/02/cvcollectioncmd-collecting-concurrency-visualizer-traces-where-visual-studio-11-is-not-installed.aspx">CVCollectionCmd</a> on a machine without Visual Studio 11 in order to collect traces for use with the Concurrency Visualizer.&nbsp; To view the traces in the Concurrency Visualizer, it&rsquo;s simply a matter of bringing the trace files back to the machine with Visual Studio 11.&nbsp; However, there are a few things you need to know.</p>
<h1>Be sure to Analyze the Collected Trace Before Moving them to Another Machine</h1>
<p>After collecting the trace, analyze the trace on the same machine where it was collected.&nbsp; If you analyze the trace on another machine, some call stacks may not resolve.&nbsp; Use the Analyze command.</p>
<h1>Copy the Files to the Machine with Visual Studio 11</h1>
<p>After analysis completes there will be four files associated with the trace:</p>
<ol>
<li>CVTrace file &ndash; This is the main file associated with your trace.&nbsp; Visual Studio 11 recognizes this file and will open it.</li>
<li>CVData file &ndash; This file is generated after analysis and contains the processed data associated with the trace.</li>
<li>kernel.etl &ndash; This file contains raw trace data associated with kernel events.</li>
<li>user.etl &ndash; This file contains raw trace data associated with user-mode events.</li>
</ol>
<p>If you collected the trace by launching an exe or attaching to a specific process, you only need to bring files 1 and 2 back to the machine with Visual Studio 11.&nbsp; If you collected a system-wide trace (by using the Attach command without a process specified), then you need to bring all of the files back to the machine with Visual Studio 11.&nbsp; This is because with a system-wide trace, you need to perform analysis on each new process you want to examine.&nbsp; For analysis, you need files 3 and 4.</p>
<h1>Open the CVTrace File From Visual Studio 11</h1>
<p>Once&nbsp; you&rsquo;ve copied the necessary files back to the machine with Visual Studio 11, you merely need to open the CVTrace file.&nbsp; You can do this using the File-&gt;open dialog in Visual Studio 11.&nbsp; You can also use the Open Trace dialog under the Concurrency Visualizer menu:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/4062.image_0225CA02.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/4062.image_5F00_0225CA02.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/7608.image_thumb_56E132FA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/7608.image_5F00_thumb_5F00_56E132FA.png" width="593" height="230" /></a></p>
<p><span style="color: #a5a5a5;" color="#a5a5a5">James Rapp &ndash; Parallel Computing Platform</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Where is the CVCollectionCmd installer?</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/where-is-the-cvcollectioncmd-installer</link>
      <pubDate>Sat, 03 Mar 2012 10:00:00 GMT</pubDate>
      <dc:creator><![CDATA[James Rapp]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2012/03/03/where-is-the-cvcollectioncmd-installer/</guid>
      <description><![CDATA[Previously, I described how to use CVCollectionCmd to collect Concurrency Visualizer traces on a...]]></description>
      <content:encoded><![CDATA[<p>Previously, I described <a href="https://blogs.msdn.com/b/visualizeparallel/archive/2012/03/02/cvcollectioncmd-collecting-concurrency-visualizer-traces-where-visual-studio-11-is-not-installed.aspx">how to use CVCollectionCmd</a> to collect Concurrency Visualizer traces on a machine that lacks Visual Studio.&nbsp; But where is the CVCollectionCmd installer?&nbsp; This entry describes where to find the CVCollectionCmd installer and how to deploy it.</p>
<p>The answer to this question depends on whether you have a Visual Studio 11 DVD or whether you installed it from the web.&nbsp;</p>
<h1>Locating the Installer on the Visual Studio DVD</h1>
<p>If you have the Visual Studio 11 DVD, you&rsquo;ll find a top-level directory called &ldquo;Concurrency Visualizer&rdquo;.&nbsp; The installer, &ldquo;concvi_standalonecollection&rdquo; is located here.</p>
<h1>Locating the Installer When Visual Studio was Installed from the Web</h1>
<p>If you do not have the Visual Studio 11 DVD, you can still obtain the installer for CVCollectionCmd.&nbsp; Here is how:</p>
<ol>
<li>Locate the Visual Studio 11 installer.&nbsp; In my case, I downloaded the installer to c:\users\my name\downloads and the installer is &ldquo;vs_ultimate.exe&rdquo;.&nbsp; The installer name will vary depending on the SKU you installed.</li>
<li>Open a command prompt, and navigate to the directory containing the Visual Studio 11 installer.</li>
<li>Type &lt;installer name&gt; /layout.&nbsp; For me, the installer name is &ldquo;vs_ultimate.exe&rdquo;, so I type &ldquo;vs_ultimate.exe /layout&rdquo;</li>
<li>The dialog that appears will prompt you to choose a location where the downloaded files will be saved. &nbsp;</li>
</ol>
<p>This will download the non-installable files associated with Visual Studio 11.&nbsp; Thus, after the download completes, you should now see a directory titled &ldquo;Concurrency Visualizer&rdquo; in the directory you specified during step 4.&nbsp; This contains the CVCollectionCmd installer.</p>
<h1>Deploying CVCollectionCmd</h1>
<p>Now, you need to deploy CVCollectionCmd on the machine where you want to use it.</p>
<ol>
<li>Copy the installer, &ldquo;concvi_standalonecollection.exe&rdquo;, to the machine you want to run it on.</li>
<li>Run the installer (you&rsquo;ll need admin privileges).</li>
</ol>
<p>(Note that using the installer is the recommended approach because it allows Microsoft to service CVCollectionCmd. &nbsp;However, it may be possible to deploy the installer locally, and just xcopy the files to the machine on which you want to run CVCollectionCmd.)</p>
<p>You are now ready to use CVCollectionCmd.exe.&nbsp; After deployment, this file is typically located under c:/Program Files/Microsoft Concurrency Visualizer Collection Tools (or c:/Program Files (x86)/Microsoft Concurrency Visualizer Collection Tools).</p>
<p><span color="#666666" style="color: #666666;">James Rapp &ndash; Parallel Computing Platform</span></p>]]></content:encoded>
    </item>
    <item>
      <title>CVCollectionCmd: Collecting Concurrency Visualizer Traces where Visual Studio 11 is not Installed</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/cvcollectioncmd-collecting-concurrency-visualizer-traces-where-visual-studio-11-is-not-installed</link>
      <pubDate>Fri, 02 Mar 2012 11:57:00 GMT</pubDate>
      <dc:creator><![CDATA[James Rapp]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2012/03/02/cvcollectioncmd-collecting-concurrency-visualizer-traces-where-visual-studio-11-is-not-installed/</guid>
      <description><![CDATA[The Concurrency Visualizer in Visual Studio 11 comes with a standalone collection utility that...]]></description>
      <content:encoded><![CDATA[<p>The Concurrency Visualizer in Visual Studio 11 comes with a standalone collection utility that allows you to collect traces on machines where Visual Studio 11 is not installed.&nbsp; This may come in handy when you need to visualize the behavior of an application, but cannot install Visual Studio 11 on the machine where you intend to run the application.&nbsp; In this entry, I will provide an overview of CVCollectionCmd.</p>
<h1>Collecting a Trace</h1>
<p>There are a few different ways to collect a trace.&nbsp; If you are interested in visualizing data associated with a single process, you can either launch an executable under the Concurrency Visualizer or attach to a running process on the system.&nbsp; You can also collect a system-wide trace if you want to choose a process to investigate after collection.</p>
<h2>Launching an Executable Under CVCollectionCmd</h2>
<p>To launch an executable under the CVCollectionCmd, use the Launch command.&nbsp; For example,</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Launch &ldquo;C:\Users\MyName\Documents\ConsoleApplication1.exe&rdquo;</span></p>
<p>When I am finished collecting the trace, I need to detach:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Detach</span>&nbsp;</p>
<h2>Attaching to a Running Process</h2>
<p>In this example, suppose I want to collect a trace on cmd.exe.&nbsp; In my case cmd.exe is running under process ID (PID) 5520.&nbsp; I can attach the Concurrency Visualizer to this process using the Attach command.&nbsp; In this case, I need to supply the Attach command with the process I want to attach to (for this, use the /Process option).&nbsp; I can either supply the name (if the name uniquely identifies the process) or the PID.&nbsp; Therefore, I can type the following:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Attach /Process cmd</span></p>
<p>Alternatively, I could refer to cmd.exe by its PID:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Attach /Process 5520</span></p>
<p>Either way, I am now collecting data on this process.&nbsp; When I am finished collecting the trace, I need to detach:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Detach</span>&nbsp;</p>
<h2>Collecting a System-Wide Trace</h2>
<p>In some cases, you may prefer to trace all processes running on the system.&nbsp; To do this, simply use the Attach command without specifying a single process:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Attach</span></p>
<p>When you are finished collecting the trace, you need to detach:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Detach</span></p>
<h1>Analyzing a Trace</h1>
<p>It is important to analyze the trace you collected on the same machine.&nbsp; If you analyze on a different machine, you run the risk that the Concurrency Visualizer will not resolve some call stacks.&nbsp; To analyze a trace you recently collected, first find the trace.&nbsp; Typically, the trace is saved to the current directory of the command prompt you are using.&nbsp; In my case, this happens to be c:/users/MyName.</p>
<p>When analyzing a trace, the Concurrency Visualizer processes raw trace data associated with a single process.&nbsp; Therefore, you need to specify the process you want to analyze if you collected a system-wide trace.&nbsp; If the trace is not system-wide, the process of interest is already known to the Concurrency Visualizer, so one need not specify it.</p>
<p>To analyze a trace, use the Analyze command and specify the location of the CVTrace file that was generated during collection.&nbsp; For a system-wide trace, you also need to specify the process of interest.&nbsp; In my case, I want to analyze data associated with the cmd process that was running on my system during system-wide collection.&nbsp; Therefore, I type the following:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Analyze &ldquo;c:/users/MyName/SystemWideCollection_2011_11_14_141211.CVTrace&rdquo; /process cmd</span></p>
<p>I also collected a non-system-wide trace associated with this process.&nbsp; To analyze this trace, I do not need to specify the process of interest.&nbsp; Thus, I need only specify the location of the CVTrace file:</p>
<p><span face="Consolas" style="font-family: Consolas;">CVCollectionCmd.exe /Analyze "C:\Users\MyName\cmd_2011-11-14_131049.CvTrace"</span></p>
<p>Once analyzed, you can open the trace in Visual Studio 11 to view the results.</p>
<p></p>
<p>See also: The <a href="https://msdn.microsoft.com/en-us/library/hh543788(v=vs.110).aspx">MSDN documentation for CVCollectionCmd</a>. &nbsp;It describes the full list of commands.</p>
<p><span color="#a5a5a5" style="color: #a5a5a5;">James Rapp &ndash; Parallel Computing Platform</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Concurrency Visualizer SDK: Advanced Visualization Techniques</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/concurrency-visualizer-sdk-advanced-visualization-techniques</link>
      <pubDate>Thu, 03 Nov 2011 18:29:41 GMT</pubDate>
      <dc:creator><![CDATA[James Rapp]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2011/11/03/concurrency-visualizer-sdk-advanced-visualization-techniques/</guid>
      <description><![CDATA[In the previous entry, I described basic usage scenarios of the Concurrency Visualizer SDK.&#160; In...]]></description>
      <content:encoded><![CDATA[<p>In the <a href="https://blogs.msdn.com/b/visualizeparallel/archive/2011/10/17/introducing-the-concurrency-visualizer-sdk.aspx">previous entry</a>, I described basic usage scenarios of the Concurrency Visualizer SDK.&#160; In this entry, I will illustrate techniques to gain tighter control over the way you visualize meaningful events in your application.</p>  <h1></h1>  <h1>The Application</h1>  <p>To best illustrate the concepts in this entry, I’ll use a fictional weather simulation app.&#160; It simulates changes in weather using multiple iterations (each iteration represents an hour of simulation time).&#160; For each iteration, the app performs the following four-step calculation:</p>  <ol>   <li>Update solar input </li>    <li>Calculate ground temperature </li>    <li>Update atmospheric pressure </li>    <li>Calculate precipitation </li> </ol>  <p>This simulation can be performed in parallel.&#160; In this application, I use C# and the .NET Thread Pool to parallelize the workload.&#160; </p>  <p>Without diving into the implementation of the simulation functions themselves, the code does this:</p>  <pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"><span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> Main(<span style="color: #0000ff">string</span>[] args)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">{
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   DateTime simTime=<span style="color: #0000ff">new</span> DateTime(2011, 11, 5, 0, 0, 0);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   doneEvents = <span style="color: #0000ff">new</span> ManualResetEvent[degreeOfParallelism];
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; doneEvents.Length; i++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   {
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      doneEvents[i] = <span style="color: #0000ff">new</span> ManualResetEvent(<span style="color: #0000ff">false</span>);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   }
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   <span style="color: #008000">//each iteration represents one hour of weather activity</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> n = 0; n &lt; numIterations; n++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   {
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #008000">//Phase 1 - Update solar input</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; degreeOfParallelism; i++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      {
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         doneEvents[i].Reset();
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         ThreadPool.QueueUserWorkItem(updateSolarInput, i);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      }
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      WaitHandle.WaitAll(doneEvents);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #008000">//Phase 2 - Calculate ground temperature</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; degreeOfParallelism; i++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      {
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         doneEvents[i].Reset();
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         ThreadPool.QueueUserWorkItem(calculateGroundTemperature, i);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      }
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      WaitHandle.WaitAll(doneEvents);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #008000">//Phase 3 - Update atmospheric pressure</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; degreeOfParallelism; i++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      {
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         doneEvents[i].Reset();
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         ThreadPool.QueueUserWorkItem(updateAtmosphericPressure, i);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      }
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      WaitHandle.WaitAll(doneEvents);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #008000">//Phase 4 - Calculate precipitation</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; degreeOfParallelism; i++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      {
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         doneEvents[i].Reset();
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">         ThreadPool.QueueUserWorkItem(calculatePrecipitation, i);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      }
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      WaitHandle.WaitAll(doneEvents);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      simTime=simTime.AddHours(1);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   }
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">}</pre></pre>


<p>A static variable, <em>degreeOfParallelism</em>, defines the number of threads that simultaneously participate in the weather simulation.&#160; Since the results of each phase in an iteration depend on the previous phase, I use <a href="https://msdn.microsoft.com/en-us/library/system.threading.manualresetevent.aspx">ManulResetEvent</a>s to effectively create a barrier, so threads don’t proceed to the next phase until all threads have finished the current phase. </p>

<p>In this example, I am running this on a machine with a dual core processor.&#160; I set <em>degreeOfParallelism</em> to 2 and ran the code for 2 iterations.&#160; I want to run this under the Concurrency Visualizer to get a general picture of the way this executes.&#160; I’m curious to know whether the phases are load balanced and roughly how long each phase takes.&#160; Here is a picture of the Threads View after running this under the Concurrency Visualizer:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/4428.image_4699C632.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/4428.image_5F00_4699C632.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/6560.image_thumb_288B9271.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/6560.image_5F00_thumb_5F00_288B9271.png" width="792" height="185" /></a></p>

<p>From this view, I can see that the the Main thread simply queued the work items and blocked while the computation progressed.&#160; The three worker threads carried out the work (as shown by the green execution category).&#160; The worker threads aren’t 100% busy however.&#160; From this picture, it’s hard to know when each phase was carried out.&#160; As introduced in the <a href="https://blogs.msdn.com/b/visualizeparallel/archive/2011/10/17/introducing-the-concurrency-visualizer-sdk.aspx">previous entry</a>, I can use a span to demarcate the execution of an application phase.&#160; But unlike the example shown in the previous entry, I want to use my own Marker provider, rather than use the default provider.</p>

<h1>Creating Your Own Marker Provider</h1>

<p>The expected convention is to use a single provider per application.&#160; I definitely want to use my own provider in order to avoid conflicts with other applications or libraries that already make use of the default Marker provider.</p>

<p>To create the provider in C#, I instantiate a new MarkerWriter object by specifying a GUID:</p>

<pre><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">MarkerWriter writer = <span style="color: #0000ff">new</span> MarkerWriter(
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      <span style="color: #0000ff">new</span> Guid(&quot;<span style="color: #8b0000">9f34bddd-eae4-40c9-b668-91d78fc0b316</span>&quot;));
</pre></pre></pre>


<p>I can’t generate Marker events from the provider itself.&#160; Instead, I need to generate events from a MarkerSeries object.&#160; I’ll describe this further later in the entry.&#160; For now, think of a MarkerSeries as a serial channel of Marker events from a MarkerWriter.&#160; A MarkerWriter may have multiple MarkerSeries.&#160; I create my MarkerSeries using the following constructor:</p>

<pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">MarkerSeries series = writer.CreateMarkerSeries(&quot;<span style="color: #8b0000"></span>&quot;);</pre></pre>

<p>The constructor takes a string, meant as a friendly name of the series.&#160; At the moment, I’m only planning to use one series for this provider, so I’ll leave the name empty.</p>

<p>I am now ready to begin generating events from <em>series</em>.&#160; In order for the Concurrency Visualizer to listen to these events and display them in the Threads View, I need to register my new provider.&#160; To do so, I open the Advanced Settings Dialog (Analyze-&gt;Concurrency Visualizer-&gt;Advanced Settings).&#160; Next, I select the Markers tab.&#160; Here, I select the “Add new provider” button:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/1362.image_7D46FB69.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/1362.image_5F00_7D46FB69.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/5483.image_thumb_61363C7E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/5483.image_5F00_thumb_5F00_61363C7E.png" width="632" height="477" /></a></p>

<p>I type the friendly name of my provider (“WeatherApp”) and specify its GUID (the same one I used when instantiating the MarkerWriter).&#160; </p>

<h1>Generating Spans and Flags</h1>

<p>My first step is to surround each phase of my application with a Marker span.&#160; This way, I can see when each phase occurs on each thread.&#160; For example, on either side of calculating the ground temperature, I add the following calls:</p>

<pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">var span = series.EnterSpan(&quot;<span style="color: #8b0000">Calculating Ground Temperature</span>&quot;);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"><span style="color: #008000">//code that calculates ground temperature</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">span.Leave();</pre></pre>


<p>In addition, I want to indicate the simulation time when I begin each iteration.&#160; I’ll add a flag whenever I begin a new iteration.</p>

<pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">...
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"><span style="color: #008000">//each iteration represents one hour of weather activity</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"><span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> n = 0; n &lt; numIterations; n++)
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">{
</pre><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">        series.WriteFlag(&quot;<span style="color: #8b0000">Iteration </span>&quot; + n + 
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">           &quot;<span style="color: #8b0000">: time = </span>&quot; + simTime.TimeOfDay);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"></pre></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">        <span style="color: #008000">//Phase 1 - Update solar input</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">        ...</pre></pre>


<p>Using my <em>series </em>object, I generate a flag specifying the iteration number and the corresponding simulation time.&#160; Simulation time is tracked in the simTime structure (<a href="https://msdn.microsoft.com/en-us/library/system.datetime.aspx">DateTime</a>).</p>

<p>As a result of adding these calls, I now see the following visualization in the Threads View:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/1781.image_07981FCA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/1781.image_5F00_07981FCA.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/5076.image_thumb_156A65C5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/5076.image_5F00_thumb_5F00_156A65C5.png" width="699" height="271" /></a></p>

<p>I can see that the Main Thread generated two flags, which show the start of two iterations.&#160; Each worker thread generated spans when it entered and left each phase within an iteration.&#160; For example, I can see that Worker Thread 3400 executed all four phases within the first iteration but only two of the phases in the second iteration.&#160; Some of the text is cut off because there isn’t enough room to display it.&#160; I can hover over each span or zoom in to see its full description.&#160; </p>

<p>By adding these flags and spans, I can already understand a lot more about the way this application executes.&#160; As one example, I can see that the first phase in an iteration seems to take twice as long on one of the threads as compared to the other.&#160; This is clearly one area ripe for investigation.</p>

<h1>Using Categories</h1>

<p>In some cases, you may find it useful to differentiate various application events by groups.&#160; This is very specific to the set of events generated by each application.&#160; In this example, it makes sense for me to divide events into three categories:</p>

<ol>
  <li>Events that describe the overall behavior of the weather simulation, such as an iteration beginning. </li>

  <li>Events related to calculations pertaining to the ground (i.e. solar absorption and ground temperature calculations). </li>

  <li>Events that relate to the atmosphere (i.e. calculating the atmospheric pressure and precipitation). </li>
</ol>

<p>Therefore, I will group flags that mark the beginning of an iteration into category 0, spans that demarcate the <em>updateSolarInput</em> and <em>calculateGroundTemperature</em> phases into category 1, and spans that demarcate the <em>updateAtmosphericPressure</em> and <em>calculatePrecipitation</em> into category 2.</p>

<p>To specify the category for the flags I generate, I call a different overload of WriteFlag():</p>

<pre><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">series.WriteFlag(0, &quot;<span style="color: #8b0000">Iteration </span>&quot; + n + 
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">      &quot;<span style="color: #8b0000">: time = </span>&quot; + simTime.TimeOfDay);</pre></pre></pre>


<p>In addition to the description, I now pass an integer that specifies that the flag belongs to category 0.</p>

<p>Similarly, to specify the category associated with the spans I generate, I make the following call:</p>

<pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">var span = series.EnterSpan(1, &quot;<span style="color: #8b0000">Calculating Ground Temperature</span>&quot;);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px"><span style="color: #008000">//code that calculates ground temperature</span>
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">span.Leave();</pre></pre>


<p>Since this span demarcates a region of code responsible for ground calculations, I group it with category 1.&#160; After making these changes, I run my code again under the Concurrency Visualizer and see the following picture:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/5008.image_3C387C05.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/5008.image_5F00_3C387C05.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/4011.image_thumb_072BECD5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/4011.image_5F00_thumb_5F00_072BECD5.png" width="703" height="269" /></a></p>

<p>Since I grouped my Markers into various categories, the Concurrency Visualizer displays them in different colors for the purpose of glancibility. </p>

<h1>Using Importance Levels</h1>

<p>Marker events aren’t all created equal.&#160; You may want to call a greater importance to certain events.&#160; I can use the <em>Importance</em> enum, which defines low, normal, high, and critical importance levels.&#160; For the purposes of illustration, suppose I consider the 0th iteration of this simulation to be incredibly unimportant while the 1st iteration is critically important.&#160; I can represent this in the flags I am generating for each iteration by adding <em>Importance </em>as a parameter when I write the flag.&#160; For the 0th iteration, I generate a flag with low importance:</p>

<pre><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">series.WriteFlag(Importance.Low, 0, &quot;<span style="color: #8b0000">Iteration </span>&quot; + 
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">     n + &quot;<span style="color: #8b0000">: time = </span>&quot; + simTime.TimeOfDay);
</pre><font face="Segoe UI">And for the 1st iteration, I generate a flag with critical importance:</font></pre></pre>

<pre><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">series.WriteFlag(Importance.Critical, 0, &quot;<span style="color: #8b0000">Iteration </span>&quot; + n + 
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">     &quot;<span style="color: #8b0000">: time = </span>&quot; + simTime.TimeOfDay);</pre></pre></pre>

<p>In this case, I’ll also consider the spans I generate for the <em>calculateGroundTemperature</em> phase to have high importance:</p>

<pre><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">var span = series.EnterSpan(Importance.High, 1, 
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">   &quot;<span style="color: #8b0000">Calculating Ground Temperature</span>&quot;);</pre></pre></pre>

<p>If an instantaneous event occurs that is severe enough, such as an exception being thrown, I may want to call special attention to it in my application.&#160; To do this, I can generate an a<em>lert</em>.&#160; An <em>alert </em>is a special case of a flag, whose importance is critical.&#160; An alert’s category is the reserved –1 category.&#160; In my application, I added the following call to the code that throws an exception:</p>

<pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">series.WriteAlert(e.Message);</pre></pre>

<p>e is the exception and the above alert simply wraps the exception’s message.&#160; After the above changes, I now see the following picture:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8306.image_2DFA0315.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8306.image_5F00_2DFA0315.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8228.image_thumb_3BCC4910.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8228.image_5F00_thumb_5F00_3BCC4910.png" width="715" height="277" /></a></p>

<p>The difference in this picture is the changed appearance of the flags that mark the beginning of an iteration.&#160; The flag that marks the 0th iteration is now smaller while the other flag is larger and shows a ‘!’ (to indicate that it is critical).&#160; In addition, I can see a red flag that represents an alert generated by thread 3428 while it was calculating precipitation.&#160; When I hover over it, the tooltip shows the message of the exception I wrapped in the alert.</p>

<p>Using categories and importance levels is not only useful in affecting the appearance of Markers.&#160; These can also be used as parameters for filtering.</p>

<h1>Filtering</h1>

<p>In some cases, you may not care to see unimportant Markers or Markers from a specific category.&#160; In fact, you may not want to see Markers from a particular provider at all.&#160; You can filter based on these characteristics in the Advanced Settings dialog.&#160; In this case, I only want to collect Markers from categories 0 and 1.&#160; Recall that this includes the flags that mark the beginning of iterations and spans that relate to ground calculations.&#160; In addition, I only want to collect events with importance of high or critical.&#160; I can configure this for my “WeatherApp” provider by selecting it and then clicking the “Edit provider” button:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/5670.image_1FBB8A25.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/5670.image_5F00_1FBB8A25.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/0602.image_thumb_4689A065.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/0602.image_5F00_thumb_5F00_4689A065.png" width="686" height="504" /></a></p>

<p>I specify that I want to collect categories 0 and 1 by entering “0,1” in the categories field.&#160; If I wanted to collect a larger range of categories, such as 100 to 200, I could enter “100-200”.&#160; I specify that I only want to collect events with at least high importance by using the optional dropdown.&#160; </p>

<p>As an aside, I can choose not to collect events from a particular provider altogether by unchecking the box next to its name in the list of providers.</p>

<p>After changing these options, I now see the following picture:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8625.image_1F4F5730.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8625.image_5F00_1F4F5730.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/2352.image_thumb_2D219D2B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/2352.image_5F00_thumb_5F00_2D219D2B.png" width="686" height="237" /></a></p>

<p>Based on the options I selected, I now only see Markers with importance of high or critical and belonging to category 0 or 1.&#160; This includes the flag marking the beginning of iteration 1 and the spans marking the phase that calculates ground temperature.</p>

<h1>Using Series</h1>

<p>As I alluded to earlier in this entry, a Series is a logical grouping of events that are generated by a particular provider.&#160; If you need to break the events you are generating into different logical serial channels of events, you can use different Series under a single provider.&#160; This is especially meaningful and important when different series of events are independent of one another.</p>

<p>In my weather simulation, I showed the use of categories by breaking overall simulation events, ground events, and atmosphere events into distinct categories.&#160; To illustrate series, I’ll now remove the category distinctions, and instead generate these categories of events from different series.&#160; First, I need to create three different series:</p>

<pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">overallSeries = writer.CreateMarkerSeries(&quot;<span style="color: #8b0000">Simulation</span>&quot;);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">groundSeries = writer.CreateMarkerSeries(&quot;<span style="color: #8b0000">Ground</span>&quot;);
</pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">atmosphereSeries = writer.CreateMarkerSeries(&quot;<span style="color: #8b0000">Atmosphere</span>&quot;);</pre></pre>


<p>I give each series a descriptive name to help me remember the set of events generated by each.&#160; I’ll use the “Simulation” series to generate events that describe the simulation overall.&#160; This includes the events that mark the beginning of each iteration.&#160; I’ll use the “Ground” series for events related to ground calculations.&#160; This includes the spans that demarcate the <em>updateSolarInput</em> and <em>calculateGroundTemperature</em> phases.&#160; The “Atmosphere” series generates events pertaining to atmospheric calculations, namely, the <em>updateAtmosphericPressure</em> and <em>calculatePrecipitation</em> phases.&#160; After updating my code, I see the following picture when I run it under the Concurrency Visualizer:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/3823.image_53EFB36B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/3823.image_5F00_53EFB36B.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/6560.image_thumb_4CD076F3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/6560.image_5F00_thumb_5F00_4CD076F3.png" width="676" height="312" /></a></p>

<p>I can now see that the description associated with each Marker channel shows the provider and the series.&#160; The top channel shows the events from the “Simulation” series, the next three show events from the “Atmosphere” series, and the next two show events from the “Ground” series.&#160; Markers from different series are shown in different channels in the Threads View.&#160; In particular, there is a unique Marker channel for each unique combination of thread ID, provider, and series.</p>

<h1>Conclusion</h1>

<p>As you can see from the <a href="https://blogs.msdn.com/b/visualizeparallel/archive/2011/10/17/introducing-the-concurrency-visualizer-sdk.aspx">previous entry</a>, the basic features of the Concurrency Visualizer SDK are very simple to use.&#160; However, sometimes the basic usage scenarios just aren’t adequate when it comes to visualizing more complex patterns of application behavior.&#160; The Concurrency Visualizer SDK exposes more control over visualization for those who need it, but makes it easy to get started for those who don’t.&#160; Whether you need this type of control or not, I hope this entry at least gives you the tools to get started should you choose to.&#160; Whether used at a basic level or advanced level, the Concurrency Visualizer SDK can greatly decrease the time it takes to make sense of complex diagnostic data.</p>

<p><font color="#a5a5a5">James Rapp – Parallel Computing Platform</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Introducing the Concurrency Visualizer SDK</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/introducing-the-concurrency-visualizer-sdk</link>
      <pubDate>Mon, 17 Oct 2011 15:41:00 GMT</pubDate>
      <dc:creator><![CDATA[James Rapp]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2011/10/17/introducing-the-concurrency-visualizer-sdk/</guid>
      <description><![CDATA[The Concurrency Visualizer displays rich data related to CPU thread behavior, DirectX activity,...]]></description>
      <content:encoded><![CDATA[<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"></pre>
<p>The Concurrency Visualizer displays rich data related to CPU thread behavior, DirectX activity, and disk I/O, among other things.&nbsp; This information can be incredibly valuable when investigating application behavior, but sometimes it's difficult to quickly understand how the data displayed in the Concurrency Visualizer maps to application behavior.&nbsp; For this reason, we've added the Concurrency Visualizer SDK, which you can use in Visual Studio 11 Developer Preview.&nbsp; This SDK allows you to instrument your code in order to augment the visualizations displayed in the Threads View of the Concurrency Visualizer.&nbsp; These visualizations, referred to as "Markers", make the Threads View data more semantically meaningful because they represent specific phases and events in your application.</p>
<p>For those of you who have used <a href="https://msdn.microsoft.com/en-us/library/dd984115.aspx">Scenario Markers</a> with the Visual Studio 2010 Concurrency Visualizer, you'll find that the Concurrency Visualizer SDK is conceptually similar, but provides much more control and flexibility.</p>
<p>The SDK exposes three visual primitives:</p>
<ol>
<li>Span</li>
<li>Flag</li>
<li>Message</li>
</ol>
<p>A span represents an interval of time in your application, such as an application phase.&nbsp; A flag represents a single point in time (e.g. the point where some value reached a threshold or when an exception was thrown).&nbsp; A message also represents a single point in time, but is meant as a visual analog to classic event-style tracing.&nbsp; So what might have previously been dumped to a log file can now be wrapped in a message call.&nbsp; This will yield visualizations in the Threads View and you'll have the ability (via the UI) to export the data into a CSV file.&nbsp; While there are more advanced ways to make use of this SDK, I'll try to introduce the most basic usage scenarios in this entry.</p>
<h1>Adding the SDK to your Project</h1>
<p>To get started, you need to add the SDK to your project:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/1663.image_6898A57A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/1663.image_5F00_6898A57A.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/4300.image_thumb_2F159583.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/4300.image_5F00_thumb_5F00_2F159583.png" width="676" height="264" /></a></p>
<p>In the dialog that appears, select the project in which you want to use the SDK and then click &ldquo;Add SDK to Selected Project&rdquo;.&nbsp; For a managed project, this adds a reference to the DLL associated with the SDK.&nbsp; For native projects, this adds the SDK header file to the project&rsquo;s include directories.&nbsp; Next, reference the namespace associated with the SDK in your source code.&nbsp; In C#, add the following using statement:</p>
<p><span style="color: #0000ff;">using</span> Microsoft.ConcurrencyVisualizer.Instrumentation;</p>
<p>In C++, include the header file:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">#include "<span style="color: #8b0000;">cvmarkersobj.h</span>"</pre>
<p>This is a header with C++ style conventions.&nbsp; If you&rsquo;re using C (or C++, but want to use the C-style conventions anyway) , include this header file instead:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">#include "<span style="color: #8b0000;">cvmarkers.h</span>"</pre>
<p><span face="Segoe UI" style="font-family: 'Segoe UI';">This header exposes the same functionality, but follows C-style conventions.</span></p>
<h1>Basic Span Usage</h1>
<p>A span is meant to represent an application phase.&nbsp; Consider the following example code in C#:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> Main(<span style="color: #0000ff;">string</span>[] args)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            phase1();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            phase2();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        } </pre>
<p>Both phases perform some unknown amount of work.&nbsp; When I profile this application and view the results in the Threads View, I get the following:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/0508.image_27F6590B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/0508.image_5F00_27F6590B.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/8103.image_thumb_07DB4C4E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/8103.image_5F00_thumb_5F00_07DB4C4E.png" width="723" height="58" /></a></p>
<p>I can see that the main thread executed both phases, but I have no idea which is which.&nbsp; I may be able to deduce this by clicking each green segment and looking at the call stacks in an attempt to determine where one phase ends and the next beings, but this is not guaranteed to work.&nbsp; Therefore, I can instrument these with spans.&nbsp; In C# there are two syntactical ways to do this, I&rsquo;ll demonstrate the first approach on the first phase and the second approach on the second phase:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> Main(<span style="color: #0000ff;">string</span>[] args)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            <span style="color: #0000ff;">using</span> (Markers.EnterSpan("<span style="color: #8b0000;">Phase 1</span>"))
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                phase1();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            }
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            var span = Markers.EnterSpan("<span style="color: #8b0000;">Phase 2</span>");
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            phase2();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            span.Leave();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        }</pre>
<p>Both phases are now demarcated using a span, each using a different syntax.&nbsp; The choice of syntax is simply a matter of personal preference.&nbsp; Either way, I now get the following visualization in the Threads View:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/5270.image_67C03F90.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/5270.image_5F00_67C03F90.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/3125.image_thumb_7592858B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/3125.image_5F00_thumb_5F00_7592858B.png" width="748" height="72" /></a></p>
<p>Note that in C++, I&rsquo;d make the following call for a span:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">marker_series series;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"><span style="color: #008000;">//some code</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">{
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">   span s(series, _T("<span style="color: #8b0000;">Phase 1</span>"));
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">   <span style="color: #008000;">//some code</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">}</pre>
<p>I can now see that a new channel is visible in the timeline.&nbsp; This Marker channel displays the two spans I added to my code: Phase 1 and Phase 2.&nbsp; These mark the points where each phase begun and ended.&nbsp; It is now crystal clear exactly which stage of execution in the main thread corresponds to each phase.&nbsp; I can see that the second phase takes roughly twice as long as the first.&nbsp; In fact, I can select each span to see the exact duration in the report below.&nbsp; It turns out that phase 1 took 429.8 ms while phase 2 took 724.2 ms.&nbsp; Note that the thread ID associated with this Marker channel is the ID of the main thread.&nbsp; You can see this thread ID next to the name of the Marker channel.&nbsp; This indicates that the Marker events were generated from the main thread (which makes sense when you look at the source code).&nbsp; If these events had been generated from a different thread, the Marker channel would be associated with a different thread ID and by default, the channel would appear under the thread that generated its events.</p>
<h1>Basic Flag Usage</h1>
<p>You may want demarcate a specific event in your application that doesn&rsquo;t have a duration, but rather occurs at a single point in time.&nbsp; One example of this is the point at which an exception is thrown.&nbsp; Another example could be a stock market app that wants to call attention to the value of a particular stock reaching a threshold.&nbsp; To accomplish this, use a flag.&nbsp; Using the same code from the span example, suppose I want to indicate when phase 1 completes.&nbsp; I simply need to add a flag after the call to phase1(), but before the call to phase2():</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> Main(<span style="color: #0000ff;">string</span>[] args)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            phase1();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            Markers.WriteFlag("<span style="color: #8b0000;">Phase 1 complete</span>");
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            phase2();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        }</pre>
<p>This results in the following Visualization:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/4606.image_557778CE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/4606.image_5F00_557778CE.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/7838.image_thumb_355C6C11.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/7838.image_5F00_thumb_5F00_355C6C11.png" width="777" height="72" /></a></p>
<p>To generate a flag in C++, I&rsquo;d write the following:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">marker_series series;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">series.write_flag(_T("<span style="color: #8b0000;">Phase 1 complete</span>"));</pre>
<p>The Marker channel now contains an icon, whose bottom tip represents the exact point in time that the call to WriteFlag() was executed.&nbsp; This demarcates the point when phase1() was complete, but phase2() hadn&rsquo;t yet begun.</p>
<h1>Basic Message Usage</h1>
<p>In many applications, you&rsquo;ll want to output data to a log file because it may come in handy later when diagnosing performance or when debugging.&nbsp; Most of the time, you won&rsquo;t look at a log file, and even if you do, you&rsquo;ll likely look for specific information in it, ignoring 90% of it.&nbsp; For this type of information, you can use a message.&nbsp; Suppose I have the following code, which writes files and measures the amount of time required to output each file:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> Main(<span style="color: #0000ff;">string</span>[] args)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            getFileNames();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            Stopwatch sw = <span style="color: #0000ff;">new</span> Stopwatch();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            <span style="color: #0000ff;">foreach</span> (String fileName <span style="color: #0000ff;">in</span> fileNames)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                sw.Restart();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                writeFile(fileName);
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                sw.Stop();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                <span style="color: #0000ff;">long</span> duration = sw.ElapsedMilliseconds;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            }
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        }</pre>
<p>If I want to log the amount of time required to write each file using a message, I simply add the following code:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> Main(<span style="color: #0000ff;">string</span>[] args)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            getFileNames();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            Stopwatch sw = <span style="color: #0000ff;">new</span> Stopwatch();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            <span style="color: #0000ff;">foreach</span> (String fileName <span style="color: #0000ff;">in</span> fileNames)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            {
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                sw.Restart();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                writeFile(fileName);
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                sw.Stop();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                <span style="color: #0000ff;">long</span> duration = sw.ElapsedMilliseconds;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">                Markers.WriteMessage(fileName + "<span style="color: #8b0000;">:</span>" + duration);
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">            }
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">        }</pre>
<p><span face="Segoe UI" style="font-family: 'Segoe UI';">In the Threads View, I see the following:</span></p>
<pre><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/5775.image_15415F54.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/5775.image_5F00_15415F54.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/3632.image_thumb_75265296.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/3632.image_5F00_thumb_5F00_75265296.png" width="693" height="67" /></a></pre>
<p>To generate a message in C++, I&rsquo;d write the following:</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">marker_series series;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;">series.write_message(_T("<span style="color: #8b0000;">My Message</span>"));</pre>
<p>Each little grey rectangle represents a message.&nbsp; It is visually nonintrusive because after all, log-style output will be ignored most of the time.&nbsp; If I want to see the output for a message, I can hover over it and see the tooltip.&nbsp; In addition, I can view the Markers report by selecting &ldquo;Markers&rdquo; in the Visible Timeline Profile:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/7026.image_550B45D9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/7026.image_5F00_550B45D9.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/71/metablogapi/7848.image_thumb_4DEC0961.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-71-metablogapi/7848.image_5F00_thumb_5F00_4DEC0961.png" width="698" height="331" /></a></p>
<p>This report lists all of the Markers in the current visible time range (thus, zooming/panning filters this report).&nbsp; In this case, the only Markers were the 10 messages I generated.&nbsp; For each message, I can see the time at which it occurred and its associated text (in the Details column), among other things.&nbsp; In this case, I look at the output I generated (in the Details column) and find that all of the files took roughly the same amount of time to write, ranging from 445 ms to 449 ms.&nbsp; I can export this table as a CSV by clicking the &ldquo;Export&hellip;&rdquo; button above this tabular report (not visible in this screenshot because I clipped it).</p>
<h1>Conclusion</h1>
<p>What I discussed in this entry was the most basic way to get started with the Concurrency Visualizer SDK on made up code examples.&nbsp; There are more sophisticated ways to use this SDK, including using categories and importance levels, and generating Markers from multiple providers and series.&nbsp; You can even visualize ETW events that follow the event source convention as Markers.&nbsp; However, I&rsquo;ll leave this to future entries, in the interest of brevity.</p>
<p><span color="#666666" style="color: #666666;">James Rapp - </span><span color="#666666" style="color: #666666;">Parallel Computing Platform</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Interested in debugging your C++ AMP application?</title>
      <link>https://docs.microsoft.com/archive/blogs/visualizeparallel/interested-in-debugging-your-c-amp-application</link>
      <pubDate>Fri, 30 Sep 2011 10:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Christine Chambers]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/visualizeparallel/2011/09/30/interested-in-debugging-your-c-amp-application/</guid>
      <description><![CDATA[You may have heard about C++ Accelerated Massive Parallelism&nbsp;(C++ AMP) that lets you leverage...]]></description>
      <content:encoded><![CDATA[<p>You may have heard about <a href="https://blogs.msdn.com/b/visualizeparallel/archive/2011/06/17/c-accelerated-massive-parallelism.aspx">C++ Accelerated Massive Parallelism</a>&nbsp;(C++ AMP) that lets you leverage the power of GPU in parallel computing.</p>
<p>Aren't you all excited about it? Don't you&nbsp;want to try your hand at it?</p>
<p>Now it is the time with <a href="https://msdn.microsoft.com/en-us/library/windows/hardware/hh454873.aspx">Visual Studio 11 Ultimate Developer Preview</a> on <a href="https://msdn.microsoft.com/en-us/windows/apps/br229516">Windows Developer Preview</a>. You can&nbsp;write, build and debug your C++ AMP applications&nbsp;in a single IDE effortlessly. To get you started, check out <a href="https://msdn.microsoft.com/en-us/library/hh368280(v=vs.110).aspx">this article</a> on MSDN that walks you through how to debug a C++ AMP application.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>