<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Wed, 25 Nov 2009 15:45:25 -0800 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-kb/type/tips-and-techniques/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles feed</title>
    <link>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-kb/tips-and-techniques/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Recognize User Synchronization Objects in Intel(R) Thread Profiler</title>
      <description><![CDATA[ Intel(R) Thread Profiler identifies the thread and synchronization objects which impact performance. In most of cases, the user will adopt Windows* defined synchronization objects, like as event, mutex, semaphore and critical section, etc. <br /><br />However sometime the user will adopt themselves defined synchronization objects. Intel® Parallel Amplifier provides libittnotify.dll/libittnotify.h which can notify User Synchronization Objects to Intel® Thread Profiler at runtime. See below examples,<br /><br />
<p>Here is a test case: the function is used by many threads, and each thread computes value in local variable "<strong>lpot</strong>" in loop, and accumulates local value into global variable "<strong>pot</strong>"</p>
<p>1)  for( i=start; i&lt;end; i++ ) {</p>
<p>      for( j=0; j&lt;i-1; j++ ) {</p>
<p>        distx = pow( (r[0][j] - r[0][i]), 2 );</p>
<p>        disty = pow( (r[1][j] - r[1][i]), 2 );</p>
<p>        distz = pow( (r[2][j] - r[2][i]), 2 );</p>
<p>        dist = sqrt( distx + disty + distz );     </p>
<p>       <strong>lpot += 1.0 / dist;</strong></p>
<p>      }</p>
<p>   }</p>
<p> </p>
<p>   <strong>EnterCriticalSection(&amp;cs);</strong></p>
<p><strong>      pot += lpot;</strong></p>
<p><strong>   LeaveCriticalSection(&amp;cs);</strong></p>
 
<p>In this implementation, time comsumption of sys-obj "<strong>CRITICAL_SECTION cs;</strong>" will be analyzed in the result of Intel® Thread Profiler</p>
<p><img src="http://software.intel.com/file/22859" alt="TP_CS.bmp" title="TP_CS.bmp" /><br /><br />2) for( i=start; i&lt;end; i++ ) {</p>
<p>      for( j=0; j&lt;i-1; j++ ) {</p>
<p>        distx = pow( (r[0][j] - r[0][i]), 2 );</p>
<p>        disty = pow( (r[1][j] - r[1][i]), 2 );</p>
<p>        distz = pow( (r[2][j] - r[2][i]), 2 );</p>
<p>        dist = sqrt( distx + disty + distz );     </p>
<p>     <strong>   lpot += 1.0 / dist;</strong></p>
<p>      }</p>
<p>   }</p>
<p> </p>
<p>  while (!spin) {</p>
<p>        <strong>  spin = 1;</strong></p>
<p><strong>          pot += lpot;</strong></p>
<p>   }</p>
<p>   spin = 0;</p>
<p>In this implementation, time consumption of user's "spin" will <strong>NOT</strong> be analyzed</p>
<p><img src="http://software.intel.com/file/22860" alt="TP_NONE.bmp" title="TP_NONE.bmp" /> </p>
<p>3)  for( i=start; i&lt;end; i++ ) {</p>
<p>      for( j=0; j&lt;i-1; j++ ) {</p>
<p>        distx = pow( (r[0][j] - r[0][i]), 2 );</p>
<p>        disty = pow( (r[1][j] - r[1][i]), 2 );</p>
<p>        distz = pow( (r[2][j] - r[2][i]), 2 );</p>
<p>        dist = sqrt( distx + disty + distz );     </p>
<p>        lpot += 1.0 / dist;</p>
<p>      }</p>
<p>   }</p>
<p>  </p>
<p>   <strong>sync_prepare(&amp;spin);</strong></p>
<p>   while (!spin) {</p>
<p>          spin = 1;</p>
<p>         <strong> sync_acquired(&amp;spin);</strong></p>
<p>          pot += lpot;</p>
<p>   }</p>
<p>   <strong>sync_releasing (&amp;spin);</strong></p>
<p>   spin = 0;</p>
<p> </p>
<p>In this implementation, time consumption of user's "spin" will be analyzed again.</p>
<p><img src="http://software.intel.com/file/22861" alt="TP_US.bmp" title="TP_US.bmp" /> </p>
<p>Note that the user can get libittnotify's APIs as below</p>
<p> </p>
<p>#include &lt;ittnotify.h&gt;</p>
<p>......</p>
<p>typedef void (*itt_notify_sync_prepare)(void *);</p>
<p>typedef void (*itt_notify_sync_acquired)(void *);</p>
<p>typedef void (*itt_notify_releasing)(void *);</p>
<p> </p>
<p>HMODULE hMod;</p>
<p>itt_notify_sync_prepare sync_prepare;</p>
<p>itt_notify_sync_acquired sync_acquired;</p>
<p>itt_notify_releasing sync_releasing;</p>
<p>......<br />hMod = LoadLibrary("libittnotify.dll");</p>
<p>      </p>
<p style="text-align: left;">sync_prepare = (itt_notify_sync_prepare) GetProcAddress(hMod, "__itt_notify_sync_prepare");</p>
<p style="text-align: left;">sync_acquired = (itt_notify_sync_acquired) GetProcAddress(hMod, "__itt_notify_sync_acquired");</p>
<p style="text-align: left;">sync_releasing = (itt_notify_releasing) GetProcAddress(hMod, "__itt_notify_sync_releasing");</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/recognize-user-synchronization-objects-in-intelr-thread-profiler</link>
      <pubDate>Sat, 10 Oct 2009 01:00:42 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/recognize-user-synchronization-objects-in-intelr-thread-profiler#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/recognize-user-synchronization-objects-in-intelr-thread-profiler</guid>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Can’t create a new advanced build activity in Microsoft* Visual Studio* 2008</title>
      <description><![CDATA[ <p><strong>Environment:</strong></p>
<p>Microsoft* Visual Studio* 2008</p>
<p>Intel (R) VTune(TM) Performance Analyzer v9.1 Update 2 with Intel(R) Thread Profiler 3.1 Update 12</p>
<p>Intel(R) Thread Checker 3.1 Update 12</p>
<p>Intel(R) Parallel Studio, Initial Release</p>
<p> </p>
<p><strong>Problem:</strong></p>
<p>The user installed VTune(TM) Performance Analyzer with Intel(R) Thread Profiler, Intel(R) Thread Checker first, then installed Intel(R) Parallel Studio. The icons of VTune(TM) Analyzer and other tools will be hidden in Toolbar's Options due to limited length of Toolbar. However if the user opened a solution and built project(s), then click on "Tuning Browser" tab, the user can't create a new advanced build activity since the icon was grayed.</p>
<p><strong>Root-cause:</strong></p>
<p>This is an unexpected error of the integration of Microsoft* Visual Studio* after installing Intel(R) Parallel Studio. For example, when the user has no solution file opened, all icons of tools should be inactive; When the user opens a new solution file, all icons of Intel(R) Parallel Studio are active, but some icons of old tools are inactive.</p>
<p><strong><img src="http://software.intel.com/file/21563" alt="icon-grayed.bmp" title="icon-grayed.bmp" /></strong> </p>
<p><strong>Resolution:</strong></p>
<ol type="1">
<li>Click on "Tuning Browser" tab first</li>
<li>Click on "Solution Explorer" tab</li>
<li>Click on "Tuning Browse" tab again.</li>
<li>Click on the project in "Tuning Browser" window</li>
</ol>
<p>The icon of "Advanced Activity Build" should be active.<br /><br /><strong><strong><img src="http://software.intel.com/file/21564" alt="icon-on.bmp" title="icon-on.bmp" /></strong></strong></p> ]]></description>
      <link>http://software.intel.com/en-us/articles/cant-create-a-new-advanced-build-activity-in-microsoft-visual-studio-2008</link>
      <pubDate>Thu, 06 Aug 2009 02:22:15 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/cant-create-a-new-advanced-build-activity-in-microsoft-visual-studio-2008#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/cant-create-a-new-advanced-build-activity-in-microsoft-visual-studio-2008</guid>
      <category>Intel® Thread Checker for Windows* Knowledge Base</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
      <category>Intel® VTune™ Performance Analyzer for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler - Developing Multithreaded Applications [PDF]</title>
      <description><![CDATA[ <table border="0" cellspacing="15" cellpadding="0">
<tbody>
<tr>
<td class="bodycopy">
<p>This document provides guidelines for developing efficient multi-threaded applications across Intel® architecture-based symmetric multi-processors (SMP) and/or systems with Hyper-Threading Technology.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><img src="http://software.intel.com/file/6398" border="0" alt="icon" width="16" height="16" align="bottom" /></td>
<td class="bodycopy"><a href="http://software.intel.com/file/6394">Developing Multithread Applications [PDF]</a></td>
</tr>
<tr>
<td><img src="http://software.intel.com/file/6408" alt="" width="15" height="3" /></td>
<td class="bodycopy"><em>File Name:</em> multithreadyuide.pdf <br /><em>Size:</em> 2,173,605 bytes <br /><em>Date:</em> 11/2004 <br /></td>
</tr>
</tbody>
</table>

<img src="http://software.intel.com/file/6408" alt="" width="1" height="10" /><br />
<p class="bodycopy"><span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"><strong>Note:</strong> PDF Files require  <a href="javascript:ShowNewPdf(&quot;http://www.adobe.com/products/acrobat/readstep2.html&quot;)" target="_top">Adobe Acrobat* Reader</a><sup>†</sup></span></p>
<br /><img src="http://software.intel.com/file/6408" alt="" width="1" height="10" /><br />
<p class="xs"><span style="font-family: Arial,Helvetica,sans-serif; font-size: xx-small;"> <sup>†</sup> This link will take you off of the Intel Web site. Intel does not control the content of the destination Web Site.</span></p>
</td>
</tr>
</tbody>
</table> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-developing-multithreaded-applications-pdf</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-developing-multithreaded-applications-pdf#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-developing-multithreaded-applications-pdf</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler - Threading Methodology [PDF]</title>
      <description><![CDATA[ <table border="0" cellspacing="15" cellpadding="0">
<tbody>
<tr>
<td class="bodycopy">
<p>This document introduces threading concepts and provides a methodology for threading serial applications and for tuning threaded applications for performance using the Intel® Threading Tools.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><img src="http://software.intel.com/file/6398" border="0" alt="icon" width="16" height="16" align="bottom" /></td>
<td class="bodycopy"><a href="http://software.intel.com/file/6393">Threading Methodology: Principles and Practices [PDF]</a></td>
</tr>
<tr>
<td><img src="http://software.intel.com/file/6408" alt="" width="15" height="3" /></td>
<td class="bodycopy"><em>File Name:</em> methodology.pdf <br /><em>Size:</em> 1,684,645 bytes <br /><em>Date:</em> 11/2004 <br /></td>
</tr>
</tbody>
</table>

<img src="http://software.intel.com/file/6408" alt="" width="1" height="10" /><br />
<p class="bodycopy"><span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"><strong>Note:</strong> PDF Files require  <a href="javascript:ShowNewPdf(&quot;http://www.adobe.com/products/acrobat/readstep2.html&quot;)" target="_top">Adobe Acrobat* Reader</a><sup>†</sup></span></p>
<br /><img src="http://software.intel.com/file/6408" alt="" width="1" height="10" /><br />
<p class="xs"><span style="font-family: Arial,Helvetica,sans-serif; font-size: xx-small;"> <sup>†</sup> This link will take you off of the Intel Web site. Intel does not control the content of the destination Web Site.</span></p>
</td>
</tr>
</tbody>
</table> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-threading-methodology-pdf</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-threading-methodology-pdf#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-threading-methodology-pdf</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler - Product Overview</title>
      <description><![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<table border="0" cellspacing="15" cellpadding="0"><tr><td class="bodycopy">
<p>Intel® Thread Profiler is a tool to analyze the performance of software threaded with the Windows*, POSIX* or OpenMP* APIs. The Intel Thread Profiler graphically illustrates performance and helps locate threading bottlenecks, such as parallel overhead, excessive synchronization, load balance and more.</p>
<p>On Microsoft Windows*, Intel Thread Profiler is a plugin for the VTune&trade; Performance Analyzer. Additionally, Linux* IA-32 and Itanium&reg; Processor systems are supported with Remote Data Collectors.</p>
<p>For more information on this product, including how to purchase or get a free evaluation copy, please visit the 
<a href="http://www.intel.com/software/products/threading/">Intel® Threading Tools</a> web site.</p>
</td></tr></table>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="http://software.intel.com/file/6324" width="388" height="5"></td></tr>
<tr><td height="10"></td></tr>
</table>
</body></html>
 ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-product-overview</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-product-overview#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-product-overview</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler for Windows* - Execution Speed</title>
      <description><![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<table border="0" cellspacing="15" cellpadding="0"><tr><td class="bodycopy">
<p><strong>Page Contents:</strong></p>
<ul>
<li><a href="#1">For Windows* or Pthreads* API: Execution Speed</a></li>
<li><a href="#2">For OpenMP*: Execution Speed</a></li>
</ul>
<br><a name="1"></a><strong>For Windows* or Pthreads* API: Execution Speed</strong><br>The first run of your software under Intel® Thread Profiler for Windows* or Pthreads* API will accumulate the overhead of 
<a href="/en-us/articles/intel-thread-profiler-for-windows-instrumentation">instrumentation</a> and reflect the overhead in the results. All subsequent runs of the same executable code will generally have very little of this overhead. Therefore, you should always use the results from the second or later activity runs for your analysis.
<br><a name="2"></a><strong>For OpenMP*: Execution Speed</strong><br>Intel Thread Profiler for OpenMP* generally adds very little overhead and is not noticeable.
</td></tr></table>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="http://software.intel.com/file/6324" width="388" height="5"></td></tr>
<tr><td height="10"></td></tr>
</table>
</body></html>
 ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-execution-speed</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-execution-speed#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-execution-speed</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler for Windows* - Is there an Intel® Thread Profiler for Linux* product?</title>
      <description><![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<table border="0" cellspacing="15" cellpadding="0"><tr><td class="bodycopy">
<p>Intel® Thread Profiler analysis of Linux* applications can be done either through the Remote Data Collector or through the tprofile_cl command line utility. Please download the ’Remote Agent’ package from Intel® Thread Profiler for Windows* download area. The same package installs tools for either method and this package on your Linux* system.</p>
<p>Before running the tprofile_cl command line utility, we recommend you prepare the environment as follows:</p>
<blockquote>source /opt/intel/itt/tprofile/bin/32/tprofilevars.sh, or
<br>source /opt/intel/itt/tprofile/bin/32e/tprofilevars.sh</blockquote>
<p>After this you can run the command line using the command the following:</p>
<blockquote>tprofile_cl [&lt;options&gt;] &lt;application exe | launcher script&gt; [&lt;parameters for application&gt;]</blockquote>
<p>Or start up the Remote Data Collector by running 
<font class="courier">ittserver</font>.</p>
<p><strong>Operating System:</strong><br></p>
<table border="0" cellspacing="0" cellpadding="0"><tr><td class="xs">Red Hat* Linux, Red Hat* Desktop Linux* 3, Red Hat* Enterprise Linux Desktop 4, Red Hat* Desktop 3 Update 4, Red Hat* Enterprise Linux Desktop 3 Update 3, Red Hat* Enterprise Linux Desktop 3 Update 4, Red Hat* Enterprise Linux Desktop 3 Update 5, Red Hat* Enterprise Linux Desktop 4 Update 1, Red Hat* Enterprise Linux 2.1, SUSE* Linux 9.1, SUSE* Linux Enterprise Server 8.0, SUSE* Linux Enterprise Server 9.0, Red Hat* Enterprise Linux 4.0, Redhat* Desktop 3 Update 5, Redhat* Desktop 3 Update 6, Redhat* Desktop 3 Update 7, Redhat* Desktop 4 Update 2, Redhat* Desktop 4 Update 3, Redhat* Desktop 4 Update 4, SuSE* Linux* Enterprise* Desktop 10, SUSE* Linux Enterprise Server 10, Red Hat* Linux 6.2, Red Hat* Linux 6.2 SBE2, Red Hat* Linux 7.0, Red Hat* Linux 7.1, Red Hat* Linux 7.2, Red Hat* Linux 7.3, SUSE* Linux 7.3, SUSE* Linux 8.0, SUSE* Linux 8.1, Red Hat* Linux 8.0, SUSE* Linux 7.2, SUSE* Linux 7.1, SUSE* Linux 7.0, SUSE* Linux, Red Hat* Linux Advanced Server 2.x, Red Hat* Linux 9.0, Red Hat* Enterprise Linux 3.0, SUSE* Linux* 8.2, Red Hat* Linux Advanced Server 3.x, SUSE* Linux* 9.x</td></tr></table>
</td></tr></table>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="http://software.intel.com/file/6324" width="388" height="5"></td></tr>
<tr><td height="10"></td></tr>
</table>
</body></html>
 ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-is-there-an-intel-thread-profiler-for-linux-product</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-is-there-an-intel-thread-profiler-for-linux-product#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-is-there-an-intel-thread-profiler-for-linux-product</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler for Windows* - Instrumentation</title>
      <description><![CDATA[ <!--page break-->
<hr />
<div class="sectionHeading">Contents:</div>
<ul>
<li><a href="#1">What is instrumentation?</a></li>
<li><a href="#2">What is binary instrumentation?</a></li>
<li><a href="#3">Does Intel® Intel Thread Profiler support source instrumentation?</a></li>
<li><a href="#4">Does Intel Thread Profiler for OpenMP* use binary instrumentation?</a></li>
<li><a href="#5">What system resources does instrumentation use?</a></li>
<li><a href="#6">What instrumentation level should I use?</a></li>
<li><a href="#7">How do I set the default instrumentation levels?</a></li>
</ul>
<p> </p>
<p><a name="1"></a><strong>What is instrumentation?</strong><br />Intel Thread Profiler for Windows* or Pthreads* API instruments software before tracing it to find errors. Instrumentation adds benign Intel Thread Profiler library calls into the software to be traced. The Intel Thread Profiler library calls record information about threads, including thread interactions and concurrency.</p>
<p><a name="2"></a><strong>What is binary instrumentation?</strong><br />Binary instrumentation is added at run-time to an already built (made) binary module, including applications and dynamic or shared libraries. The instrumentation code is automatically inserted when you run a Intel Thread Profiler for Windows* or Pthreads* API activity in the VTune™ environment or the Microsoft .NET* Development Environment. Both Microsoft Windows* and Linux* executables can be instrumented for IA-32 processors, but not for Itanium® processors. Binary instrumentation can be used for software compiled with any of the <a href="http://support.intel.com/support/performancetools/threadprofiler/compat.htm">supported compilers</a>.</p>
<p><a name="3"></a><strong>Does Intel Thread Profiler support source instrumentation?</strong><br />No. Intel Thread Profiler for Windows* or Pthreads* API does not support source instrumentation or instrumentation added at compile-time.</p>
<p><a name="4"></a><strong>Does Intel Thread Profiler for OpenMP* use binary instrumentation?</strong><br />Application executables and dynamic or shared libraries are not instrumented. Instead the <a href="http://www.intel.com/cd/software/products/asmo-na/eng/284132.htm">Intel® Compilers</a> ship with OpenMP run-time libraries that are pre-instrumented already.</p>
<p><a name="5"></a><strong>What system resources does instrumentation use?</strong><br />The process of adding instrumentation to your software takes time (CPU MIPs) and memory. Once the instrumentation has been added, your software will both run slower and use more memory than it usually does. This is because as your software runs, the Intel Thread Profiler library is recording information about your software's threads as your software runs. The first run of your software under Intel Thread Profiler for Windows* or Pthreads* API will accumulate the overhead of instrumentation and reflect the overhead in the results. All subsequent runs of the same executable code will generally show very little of this overhead.</p>
<p><a name="6"></a><strong>What instrumentation level should I use?</strong><br />Generally using the default instrumentation level of "API Imports" is recommended for <em>User</em> code (application executables, dynamic or shared library files). You should <em>not</em> reduce the instrumentation level below "API Imports" (that is to "Module Imports") for your User code because then Intel Thread Profiler may not produce accurate results.</p>
<p><a name="7"></a><strong>How do I set the default instrumentation levels?</strong><br />First, select or create a Intel Thread Profiler for Windows* or Pthreads* API activity. Then follow these steps:</p>
<ol>
<li>In the VTune™ environment, use the <strong>Configure » Options... » Intel Thread Profiler » Instrumentation Levels</strong> dialog.</li>
<li>In the Microsoft .NET* Development Environment, use the <strong>Tools » Options... » VTune™ Performance Tools » Intel Thread Profiler » Instrumentation Levels</strong> dialog. <strong>Note:</strong> Setting the default levels in one environment, such as the VTune™ environment, does not propagate the changes to other environments, such as the Microsoft .NET* Development Environment.</li>
</ol>
<p> </p>
<!--page break-->
<hr /> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-instrumentation</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-instrumentation#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-instrumentation</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler for Windows* - Preparing Your Software: Building or Making Source Code</title>
      <description><![CDATA[ <!--page break-->
<hr />
<div class="sectionHeading">Contents</div>
<ul>
<li><strong>Intel® Thread Profiler for Windows* or Pthreads* API</strong></li>
<li><a href="#1">General Tips on Preparing Source Code</a></li>
<li><a href="#2">Run-time Warnings</a></li>
<li><a href="#3">API: Can I use it without source code?</a></li>
</ul>
<p> </p>
<ul>
<li><strong>Intel Thread Profiler for OpenMP*</strong></li>
</ul>
<ul>
<li><a href="#4">General Tips on Preparing Source Code</a></li>
<li><a href="#5">Run-time Warnings</a></li>
<li><a href="#6">API: Can I use it without source code?</a></li>
</ul>
<p> </p>
<p><a name="1"></a><strong>For Windows* or Pthreads* API: General Tips on Preparing Source Code</strong><br />The following are general tips for preparing source code for Intel Thread Profiler for Windows or Pthreads API. Build (make) your source with the following switches:</p>
<ul>
<li>For Windows*: Be sure to build thread-safe by compiling with the /MD, /MDd, /MT or /MTd switches to use the multi-threaded libraries.</li>
</ul>
<p><strong>Note:</strong> On Windows*, the default for <a href="http://www.intel.com/cd/software/products/asmo-na/eng/284132.htm">Microsoft and Intel® Compilers</a> is the /ML or /MLd switch and this does not use thread-safe libraries.</p>
<ul>
<li>Be sure to provide symbols. For Windows* generate symbols by compiling with the /Zi, /ZI or /Z7 switches and link with the /DEBUG switch. For Linux* generate symbols with the -g switch. Symbols will enable Intel Thread Profiler to specify source code information (file name and line number) with its results.</li>
</ul>
<p><strong>Note:</strong> Symbols can be generated with a "release" (optimized) build.</p>
<ul>
<li>You can use either an optimized "Release" or a non-optimized "Debug" build. A Debug build for Windows* will disable optimization with the /Od switch, and on Linux* a debug build will use the -O0 switch. Of course, just like when using a debugger, the Intel Thread Profiler Results (especially line numbers) may not be accurate, if you use an optimized build.</li>
</ul>
<ul>
<li>On Windows*, executable software must be built so that it contains a relocation section which allows for relocation in memory and relocation is required for <a href="http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-instrumentation">instrumentation</a>. Most dynamic-link library (.dll) files can be relocated by default. However by default, most executable (.exe) files cannot be relocated. So always link with the /FIXED:NO switch to allow for relocation.</li>
</ul>
<p> </p>
<p><strong>Windows* Tip:</strong> Instead of changing your project's settings, set the (system) environment variable "LINK" to the value "/FIXED:NO" and re-link your code to add a relocation section.</p>
<p><a name="2"></a><strong>For Windows* or Pthreads* API: Run-time Warnings</strong><br />On Windows*, if you get the warning "modules were created without base relocations" when you run a Intel Thread Profiler for Windows* API activity in the VTune™ environment or Microsoft .NET* Development Environment, your code probably doesn't contain a relocation section. Link with the /FIXED:NO switch to add a relocation section.</p>
<p><a name="3"></a><strong>For Windows* or Pthreads* API: Can I use it without source code?</strong><br />Yes -- But on Microsoft Windows*, do not expect to get any results for the application (.exe) file itself because typically on Windows the executable does not have a relocation section. But Intel Thread Profiler is designed to help you locate threading performance issues in source code.</p>
<p><a name="4"></a><strong>For OpenMP*: General Tips on Preparing Source Code</strong><br />The following are general tips for preparing source code for Intel Thread Profiler for OpenMP*.</p>
<ul>
<li>You must compile with <a href="http://www.intel.com/cd/software/products/asmo-na/eng/284132.htm">Intel® Compilers</a> to get support for OpenMP.</li>
<li>On Windows*, be sure to build thread-safe by compiling with the /MD, /MDd, /MT or /MTd switches to use the multi-threaded libraries. <br /><strong>Note:</strong> On Windows*, the default for Intel® Compilers is the /ML or /MLd switch and this does not use thread-safe libraries.</li>
<li>Do not compile with the /Qtcheck or -tcheck switch.</li>
<li>Symbols and line numbers are not required.</li>
<li>Use an optimized "Release" build.</li>
<li>When running in the VTune™ environment or Microsoft .NET* Developer Environment, compile with one of Windows* /Qopenmp or Linux* -openmp* switch or one of Windows* /Qopenmp_profile or Linux* -openmp switch, but not both. That is don't build with both /Qopenmp and /Qopenmp_profiler nor both of -openmp and -openmp_profile.</li>
<li>To run from the Windows* shell or DOS* command-prompt, compile with the /Qopenmp_profile switch. To run from the Linux* shell, build with -openmp_profile.</li>
</ul>
<p> </p>
<p><a name="5"></a><strong>For OpenMP*: Run-time Warnings</strong><br />I get a warning "The application you chose to launch has not been instrumented to generate OpenMP* statistics". What is this about? You built your software without <a href="http://www.intel.com/cd/software/products/asmo-na/eng/284132.htm">Intel® Compilers</a>, or your executable file was compiled without any of the /Qopenmp, /Qopenmp_profile, -openmp or -openmp_profile switches. This may be okay if you are using dynamic (.dll) or shared (.so) library file(s) that are compiled with one of the OpenMP* switches. If you're using OpenMP in library files, be sure to specify these .DLL files in the Modules of Interest dialog. <br /><a name="6"></a><strong>For OpenMP*: Can I use it without source code?</strong><br />Yes. However, Intel Thread Profiler for OpenMP* is designed to help you locate threading performance issues in source code.</p>
<p> </p>
<!--page break-->
<hr /> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-preparing-your-software-building-or-making-source-code</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-preparing-your-software-building-or-making-source-code#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-preparing-your-software-building-or-making-source-code</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Profiler for Windows* - Tips and Techniques</title>
      <description><![CDATA[ <!--page break-->
<hr />
<div class="sectionHeading">Contents</div>
<ul>
<li><a href="#1">I don't have source code. Can I use Intel® Thread Profiler?</a></li>
<li><a href="#2">DOS* Shell Redirection for Input (&lt;) or Output (&gt;)</a></li>
<li><a href="#3">I'm using OpenMP* threads. Can I use Thread Profiler for Windows* API?</a></li>
<li><a href="#4">How do I view source code in Intel Thread Profiler for Windows* or Pthreads* API results?</a></li>
<li><a href="/en-us/articles/intel-thread-profiler-for-windows-is-there-an-intel-thread-profiler-for-linux-product">Is there an Intel® Thread Profiler for Linux* product?</a></li>
</ul>
<p> </p>
<p><a name="1"></a><strong>I don't have source code. Can I use Intel® Thread Profiler?</strong><br />Yes. However, Intel Thread Profiler is designed to help you locate and understand threading performance issues in source code. Also note that on Windows*, Intel Thread Profiler for Windows* or Pthreads* API requires an executable file that has a relocation section, and without this no results will be produced for the .EXE file itself. For more information, visit <a href="http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-preparing-your-software-building-or-making-source-code">Preparing Your Software: Building or Making Source Code</a>.</p>
<p><a name="2"></a><strong>DOS* Shell Redirection for Input (&lt;) or Output (&gt;)</strong><br />My application uses DOS* command-shell redirection for input (&lt;) or output (&gt;). Can I still use Intel Thread Profiler? Yes. Use a .BAT file as the application. For example, create a <strong>myStart.bat</strong> file with this line:</p>
<blockquote>myProgram.exe &lt; myInputFile &gt; myOutputFile</blockquote>
<p>And then follow these steps:</p>
<ol>
<li>Specify <strong>myProgram.exe</strong> as the <strong>Application to launch</strong> with the Intel Thread Profiler Wizard. </li>
<li>Enable (check) <strong>Modify default configuration</strong> when done with wizard. </li>
<li>Select <strong>Advanced Activity Configuration » Application/Module profiles</strong>. </li>
<li>Select your application, which would be <strong>myProgram</strong> in this example, and then press the <strong>Configure...</strong> button. </li>
<li>Disable (un-check) <strong>Add to Modules of Interest List</strong>, and then change the <strong>Application to Launch Filename</strong>: from <strong>myProgram.exe</strong> to <strong>myStart.bat</strong>.</li>
</ol>
<p> </p>
<p><a name="3"></a><strong>I'm using OpenMP* threads. Can I use Intel Thread Profiler for Windows* API?</strong><br />Yes. You can use Intel Thread Profiler for Windows* API provided you use the <a>Intel® Compilers</a> v8.0, or higher. The Intel Thread Profiler for <a href="http://www.devx.com/go-parallel/Article/32724">OpenMP*</a> will show you OpenMP-specific results using OpenMP constructs. <strong>Note:</strong> If Intel Compiler versions lower than v8.0 are used, then the Intel Thread Profiler for Windows* API results will not be correct.</p>
<p><a name="4"></a><strong>How do I view source code in Intel Thread Profiler for Windows* or Pthreads* API results?</strong></p>
<ul>
<li>To view Thread Create, Close or Entry source code, go to the <strong>Profile</strong> view and group by <strong>Thread</strong> or <strong>Object</strong>. Right-click on any Thread or Object, and then select <strong>Creation Source View</strong>. If the <strong>Creation Source View</strong> entry on the menu is not available (grayed-out), then the source code is unknown. </li>
<li>To view thread transition source code, go to the <strong>Profile</strong> view and group by <strong>Object</strong>. Right-click on an object and <strong>Filter and Show Source locations</strong> Finally right-click on an impact-time bar and select <strong>Transition Source View</strong>. </li>
<li>Another way to view thread transition source, is with the <strong>Timeline</strong> view. Zoom into a section of the time-line, and right-click on an <strong>overhead</strong> transition. Select <strong>Transition Source View.</strong> </li>
</ul>
<p> </p>
<!--page break-->
<hr /> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-tips-and-techniques</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-tips-and-techniques#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-profiler-for-windows-tips-and-techniques</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Profiler for Windows* Knowledge Base</category>
    </item>
  </channel></rss>