<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Colin Thomsen's Microsoft Blog : profiler</title><link>http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx</link><description>Tags: profiler</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>VS2010: Attaching the Profiler to a Managed Application</title><link>http://blogs.msdn.com/colinth/archive/2009/12/05/vs2010-attaching-the-profiler-to-managed-applications.aspx</link><pubDate>Sat, 05 Dec 2009 23:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9933048</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/9933048.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=9933048</wfw:commentRss><description>&lt;P&gt;Before Visual Studio 2010, in order to attach the profiler to a managed application, certain environment variables had to be set using vsperfclrenv.cmd. An example profiling session might look like this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;vsperfclrenv /sampleon &lt;/LI&gt;
&lt;LI&gt;[Start managed application from the same command window] &lt;/LI&gt;
&lt;LI&gt;vsperfcmd /start:sample /output:myapp.vsp /attach:[pid] &lt;/LI&gt;
&lt;LI&gt;[Close application]&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If the environment variables were not correctly set, when attempting to attach you would see this message: &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_warning_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_warning_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=old_attach_warning border=0 alt=old_attach_warning src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_warning_thumb.png" width=560 height=312 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_warning_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;EM&gt;The profiling environment for ConsoleApplication2 is not set up correctly. Use vsperfclrenv.cmd to setup environment variables. Continue anyway?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The generated report would typically look something like the report below. The warning at the bottom of the page indicates the problem and the report itself would typically not be useful since no managed modules or functions would be resolved correctly.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_badreport_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_badreport_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=old_attach_badreport border=0 alt=old_attach_badreport src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_badreport_thumb.png" width=642 height=437 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/old_attach_badreport_thumb.png"&gt;&lt;/A&gt;&lt;EM&gt;&amp;nbsp; Report with 'CLRStubOrUnknownAddress and Unknown Frame(s) and the warning ‘It appears that the file was collected without properly setting the environment variables with VSPerfCLREnv.cmd. Symbols for managed binaries may not resolve’.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Fortunately the Common Language Runtime (CLR) team provided us with a new capability to attach to an already running managed application without setting any environment variables. For more detailed information take a look at &lt;A href="http://blogs.msdn.com/davbr/archive/2009/11/04/clr-v4-profiler-attach-basics-with-sample-code.aspx" mce_href="http://blogs.msdn.com/davbr/archive/2009/11/04/clr-v4-profiler-attach-basics-with-sample-code.aspx"&gt;David Broman’s post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Caveats:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;We only support attach without environment variables for basic sampling. It will not work for Allocation or Object Lifetime data collection and Instrumentation attach is not possible. Concurrency (resource contention) attach is supported. &lt;/LI&gt;
&lt;LI&gt;The new attach mechanism only works for CLR V4-based runtimes. &lt;/LI&gt;
&lt;LI&gt;The new attach mechanism will work if your application has multiple runtimes (i.e. V2 and V4&amp;nbsp; SxS), but as noted above, you can only attach to the V4 runtime. I’ll write another post about the profiler and Side by Side (SxS). &lt;/LI&gt;
&lt;LI&gt;The old environment-variable-based attach still works, so you can still use that if you prefer.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The new procedure for attaching the profiler to a managed application in Visual Studio 2010 goes like this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Launch your app (if it isn’t already running) &lt;/LI&gt;
&lt;LI&gt;Attach to it, either from the command-line or from the UI. &lt;/LI&gt;
&lt;LI&gt;When you’re finished, detach or close the app to generate a report.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_report_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_report_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=new_attach_report border=0 alt=new_attach_report src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_report_thumb.png" width=616 height=482 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_report_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you want to diagnose any issues with attach, the CLR V4 runtime provides diagnostic information via the Event Log (view with Event Viewer) and the profiler also displays information there:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_eventlog_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=new_attach_eventlog border=0 alt=new_attach_eventlog src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_eventlog_thumb.png" width=644 height=229 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VS2010AttachingtheProfilertoManagedAppli_DEA7/new_attach_eventlog_thumb.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;EM&gt;Event Log: ‘Loading profiler. Running CLR: v4.0.21202. Using ‘Profile First’ strategy’&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;There are two .NET Runtime messages regarding the attach, the first indicating that an attach was requested and the second that the attach succeeded. The VSPERF message describes which CLR is being profiled.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9933048" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/vs2010/default.aspx">vs2010</category></item><item><title>PDC 2008 - See the Sessions</title><link>http://blogs.msdn.com/colinth/archive/2008/11/01/pdc-2008.aspx</link><pubDate>Sun, 02 Nov 2008 00:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9028580</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/9028580.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=9028580</wfw:commentRss><description>&lt;P&gt;This year if you didn't get a chance to go to the &lt;A href="http://microsoftpdc.com/" mce_href="http://microsoftpdc.com/"&gt;Professional Developer's Conference (PDC)&lt;/A&gt;, there is still a wealth of information available to you. The most valuable resource I think are the videos of all the PDC sessions. Here are a few of the sessions that I've viewed and found most interesting:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://channel9.msdn.com/pdc2008/TL24/" mce_href="http://channel9.msdn.com/pdc2008/TL24/"&gt;Improving .NET Application Performance and Scalability&lt;/A&gt;, starring my boss Steve Carroll and Ed Glass,&amp;nbsp;this session&amp;nbsp;covers a bunch of new Visual Studio 2010 Profiler features.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://channel9.msdn.com/pdc2008/TL59/"&gt;Visual Studio Debugger Tips &amp;amp; Tricks&lt;/A&gt;, with speaker John Cunningham who is a Microsoft&amp;nbsp;Development Manager (and Steve's boss),&amp;nbsp;covering features in Visual Studio 2008, 2008 SP1 and features to look forward to in Visual Studio 2010. Note to self 'if you ever ship without symbols, I would fire you'.&lt;/LI&gt;
&lt;LI&gt;&lt;A id=ctl00_MainPlaceHolder_TitleLink href="http://channel9.msdn.com/pdc2008/TL03/"&gt;Microsoft Visual Studio Team System: Software Diagnostics and Quality for Services&lt;/A&gt;, featuring Habib and Justin, who are&amp;nbsp;also&amp;nbsp;folks from the diagnostics team. The most exciting demo from this talk shows off the cool&amp;nbsp;new Historical Debugging feature. It also features the new Test Impact Analysis feature, which can tell you which tests you should run after changing your code.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://channel9.msdn.com/pdc2008/PC58/" mce_href="http://channel9.msdn.com/pdc2008/PC58/"&gt;Framework Design Guidelines&lt;/A&gt;, by the guys who wrote the book of the same name, Krzysztof Cwalina and Brad Adams. If you write managed code this is a must-see session.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you'd like to try some of the Visual Studio 2010 features for yourself, you can &lt;A href="https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=9790" mce_href="https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=9790"&gt;download&amp;nbsp;the newest&amp;nbsp;CTP here&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9028580" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/vs2008/default.aspx">vs2008</category><category domain="http://blogs.msdn.com/colinth/archive/tags/vs2010/default.aspx">vs2010</category></item><item><title>Tip: VS2008 – Finding and Setting Properties (Right-Click)</title><link>http://blogs.msdn.com/colinth/archive/2008/09/19/tip-vs2008-viewing-and-setting-properties.aspx</link><pubDate>Sat, 20 Sep 2008 04:47:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8959658</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/8959658.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=8959658</wfw:commentRss><description>&lt;p&gt;The Visual Studio Profiler has many properties and options and this tip shows you where to find most of them. Future posts may cover some of the specific properties in more detail.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="770" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="347"&gt;&lt;strong&gt;Performance Session:&lt;/strong&gt;           &lt;br /&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/session_properties_4.jpg"&gt;&lt;img title="session_properties" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="482" alt="session_properties" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/session_properties_thumb_1.jpg" width="247" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Select an existing Performance Session in the Performance Explorer to see properties in the Properties Window. If the Properties Window is hidden:&amp;#160; &lt;br /&gt;Press ‘F4’ or go to           &lt;br /&gt;‘View-&amp;gt;Properties Window’.&lt;/td&gt;        &lt;td valign="top" width="56"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="369"&gt;&lt;strong&gt;Performance Report:&lt;/strong&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/report_properties_2.jpg"&gt;            &lt;br /&gt;&lt;img title="report_properties" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="482" alt="report_properties" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/report_properties_thumb.jpg" width="246" border="0" /&gt;&lt;/a&gt;           &lt;br /&gt;Select a Performance Report in the Performance Explorer to view many properties including Collection, ETW, General, Machine Information, Performance Counters, Process, Thread and Version Information.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Performance Session Properties (and Options):&lt;/strong&gt;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="100%" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/session_properties_1_4.jpg"&gt;&lt;img title="session_properties_1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 5px 0px 0px; border-right-width: 0px" height="160" alt="session_properties_1" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/session_properties_1_thumb_1.jpg" width="242" align="left" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="100%"&gt;To adjust Performance Session properties:          &lt;ol&gt;           &lt;li&gt;Right-click on the Performance Session (Performance1 in this example). &lt;/li&gt;            &lt;li&gt;Select ‘Properties’. &lt;/li&gt;         &lt;/ol&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Properties for Performance1 are shown below. There are different categories of properties on the left (e.g. General, Launch, Sampling, …).&lt;/p&gt;  &lt;p&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/session_properties_2_2.jpg"&gt;&lt;img title="session_properties_2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="482" alt="session_properties_2" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/session_properties_2_thumb.jpg" width="600" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Performance Targets:&lt;/strong&gt;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="100%" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/target_properties_1_2.jpg"&gt;&lt;img title="target_properties_1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="162" alt="target_properties_1" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/target_properties_1_thumb.jpg" width="242" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" width="100%"&gt;To adjust Performance Target properties:          &lt;ol&gt;           &lt;li&gt;Right-click on the Target (ConsoleApplication3 in this example). &lt;/li&gt;            &lt;li&gt;Select ‘Properties’. &lt;/li&gt;         &lt;/ol&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Adjust the properties for the Performance Target as required. These properties do not often need to be changed, with the possible exception of the Instrumentation property ‘&lt;a href="http://blogs.msdn.com/profiler/archive/2008/07/08/excluding-small-functions-from-instrumentation.aspx"&gt;Exclude small functions from instrumentation&lt;/a&gt;’.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/target_properties_2_2.jpg"&gt;&lt;img title="target_properties_2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="388" alt="target_properties_2" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/target_properties_2_thumb.jpg" width="600" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Tools –&amp;gt; Options –&amp;gt; Performance Tools:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Some global options can be configured using the Visual Studio Options dialog, which is accessed via:&lt;/p&gt;  &lt;p&gt;Tools –&amp;gt; Options –&amp;gt; Performance Tools&lt;/p&gt;  &lt;p&gt;&lt;a href="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/tools_options_4.jpg"&gt;&lt;img title="tools_options" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="344" alt="tools_options" src="https://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008ViewingandSettingProperties_10377/tools_options_thumb_1.jpg" width="600" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;That’s all the properties I can think of but I’m probably missing some still. Probably the most important aspect to this tip is to emphasize that right-clicking with the mouse is often the way to access important contextual information.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8959658" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/colinth/archive/tags/vs2008/default.aspx">vs2008</category></item><item><title>Tip: VS2008 - Understanding Performance Targets</title><link>http://blogs.msdn.com/colinth/archive/2008/07/18/tip-vs2008-adding-performance-targets.aspx</link><pubDate>Fri, 18 Jul 2008 23:48:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8751368</guid><dc:creator>colinth</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/colinth/comments/8751368.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=8751368</wfw:commentRss><description>&lt;a href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/default_wizard_output_slnexplorer_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="463" alt="default_wizard_output_slnexplorer" src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/default_wizard_output_slnexplorer_thumb.png" width="232" align="right" border="0" /&gt;&lt;/a&gt;   &lt;p&gt;If you have a solution that contains multiple projects it is important to know what the 'Targets' group in the Performance Explorer is used for. The &lt;a href="http://msdn.microsoft.com/en-us/library/ms182399.aspx"&gt;PeopleTrax&lt;/a&gt; solution shown on the right has 4 projects, with 3 of them compiling to managed DLLs and 1 compiling to an executable.&lt;/p&gt;  &lt;p&gt;After running the Performance Wizard to create a Performance Session the Performance Explorer contains a single target as shown below.&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/default_wizard_output_perfexplorer_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="142" alt="default_wizard_output_perfexplorer" src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/default_wizard_output_perfexplorer_thumb.png" width="211" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Only the project that compiles to an executable is listed in the 'Targets' folder (for other project types like websites it would include the default launch project). What about the other 3 projects? As this tip explains, it depends upon the type of profiling you wish to do.&lt;/p&gt;  &lt;p align="left"&gt;&lt;strong&gt;Sampling&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;With sampling there is no need to add the additional projects to your targets list. We do not modify assemblies when sampling and we will automatically attempt to collect data for any assemblies loaded by the PeopleTrax target. The only exception to this requirement is if you wish to collect data for multi-process scenarios and therefore need to launch multiple targets.&lt;/p&gt;  &lt;p align="left"&gt;&lt;strong&gt;Instrumentation&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;For instrumentation, if you wish to collect data for the additional projects they should be added to your targets list as follows:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;div align="left"&gt;In the Performance Explorer, right-click on the 'Targets' folder:        &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/add_target_project_rightclick_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="136" alt="add_target_project_rightclick" src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/add_target_project_rightclick_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;         &lt;br /&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Choose 'Add Target Project' to display a dialog:        &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/add_target_project_dialog_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="add_target_project_dialog" src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/add_target_project_dialog_thumb.png" width="204" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Select the assemblies you wish to collect Instrumentation data for and choose OK.&lt;/div&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p align="left"&gt;The selected projects will now be modified (instrumented) when you start profiling. You can selectively disable instrumentation for certain projects by right-clicking on the target and unchecking the 'Instrument' option.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/targets_launchable_trace_properties_crop_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="164" alt="targets_launchable_trace_properties_crop" src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/TipVS2008PerformanceTargets_B46B/targets_launchable_trace_properties_crop_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Instrumentation properties for a specific target.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8751368" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/colinth/archive/tags/vs2008/default.aspx">vs2008</category></item><item><title>Quick Tip: VS2008 - Compare Reports Quickly</title><link>http://blogs.msdn.com/colinth/archive/2008/06/20/quick-tip-vs2008-compare-reports-quickly.aspx</link><pubDate>Sat, 21 Jun 2008 03:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8628312</guid><dc:creator>colinth</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/colinth/comments/8628312.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=8628312</wfw:commentRss><description>&lt;P&gt;While investigating a performance problem you may need to collect many Performance Reports and compare them. You can use the Performance Explorer to quickly compare two reports by:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Selecting two reports. &lt;/LI&gt;
&lt;LI&gt;Right-clicking and choosing 'Compare Performance Reports...' &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" border=0 alt=comp_reports src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_thumb.jpg" width=354 height=308 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_thumb.jpg"&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The oldest report will be used for the 'Baseline' report and the other report will be used for the 'Comparison' report, as shown below:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_2_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_2_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" border=0 alt=comp_reports_2 src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_2_thumb.jpg" width=701 height=308 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/QuickTipVS2008CompareReportsQuickly_FB64/comp_reports_2_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8628312" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Tips/default.aspx">Tips</category></item><item><title>Tech-Ed 2008 Demos</title><link>http://blogs.msdn.com/colinth/archive/2008/06/02/tech-ed-2008-demos.aspx</link><pubDate>Tue, 03 Jun 2008 06:25:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8570835</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/8570835.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=8570835</wfw:commentRss><description>&lt;p&gt;Last year my &lt;a href="http://blogs.msdn.com/colinth/archive/2007/06/03/tech-ed-2007.aspx"&gt;boss took a trip to sunny Orlando&lt;/a&gt; to present at Tech-Ed and to offer help and suggestions in the Technical Learning Center (TLC). This year I'm lucky enough to be attending with a couple of other folks (Habib and Tim) and since I'm not an official Speaker I'll be spending most of my time hanging out in the Application Lifecycle Management (ALM) demo station for Visual Studio 2008 Team System, Development Edition.&lt;/p&gt;  &lt;p&gt;We've prepared a few demos covering things like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Profiling using Instrumentation Mode on a Virtual PC image.&lt;/li&gt;    &lt;li&gt;Collecting Allocation and Object Lifetime information.&lt;/li&gt;    &lt;li&gt;Analyzing Performance Reports.&lt;/li&gt;    &lt;li&gt;Using Code Analysis to improve your code.&lt;/li&gt;    &lt;li&gt;Enabling Code Analysis Check-In Policies.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We're also looking forward to discussing your specific scenarios so if you're at Tech-Ed and interested in diagnostic tools and solving performance problems we'd love to chat with you.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8570835" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.msdn.com/colinth/archive/tags/dev/default.aspx">dev</category></item><item><title>Performance: Inserting Marks Using Code</title><link>http://blogs.msdn.com/colinth/archive/2008/05/01/inserting-marks-using-code.aspx</link><pubDate>Thu, 01 May 2008 17:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8569496</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/8569496.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=8569496</wfw:commentRss><description>&lt;P&gt;Ian previously covered &lt;A href="http://blogs.msdn.com/ianhu/archive/2007/07/17/the-visual-studio-profiler-data-collection-control-part-1-excluding-application-startup-time.aspx" mce_href="http://blogs.msdn.com/ianhu/archive/2007/07/17/the-visual-studio-profiler-data-collection-control-part-1-excluding-application-startup-time.aspx"&gt;using the VS 2008 Data Collection Control to choose when to collect data&lt;/A&gt;. The Data Collection Control can also be used to insert marks into the performance report, but sometimes it is convenient to modify the source code to do this automatically.&lt;/P&gt;
&lt;P&gt;Consider a typical application (&lt;A href="http://msdn.microsoft.com/en-us/library/ms182399.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms182399.aspx"&gt;PeopleTrax&lt;/A&gt;) where I am interested in gathering profiler data only between when a button is clicked and when data is displayed. The application is shown below.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/pre_click.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/pre_click.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=420 alt=pre_click src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/pre_click_thumb.png" width=480 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/pre_click_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;After the 'Get People' button is clicked, data is displayed after just over 6 seconds. This seems a little excessive so I want to focus my performance investigation in this area.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/post_click.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/post_click.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=420 alt=post_click src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/post_click_thumb.png" width=480 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/post_click_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;To filter the data so that it only shows information collected between those two points, I could use the Data Collection Control, but maybe I'm planning to run a complicated scenario and don't want to have to remember to insert the marks manually. Instead, it is possible to modify the original code to request the profiler insert marks in the required locations.&lt;/P&gt;
&lt;P&gt;The Profiler API is available for managed code in an assembly that can be added directly to the project from \Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_zoom_border_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_zoom_border_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=423 alt=add_ref_zoom_border src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_zoom_border_thumb.png" width=480 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_zoom_border_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;After adding the reference it shows up in the 'References' list for the PeopleTrax project.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_done_zoom_border_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_done_zoom_border_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=277 alt=add_ref_done_zoom_border src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_done_zoom_border_thumb.png" width=222 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/add_ref_done_zoom_border_thumb.png"&gt;&lt;/A&gt; &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;I can then use functions in the Profiler API to control the profiler. This might include starting or stopping data collection or in this case, inserting marks into the datastream. This is easily achieved as shown below.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/mark_in_code_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/mark_in_code_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=262 alt=mark_in_code src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/mark_in_code_thumb.png" width=640 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/mark_in_code_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I can then profile the application and when I open the Performance Report and switch to Marks View I see that the marks have been correctly inserted. We can also see that the time elapsed between the marks is about 6.5 seconds, which corresponds with the measurement that is already displayed in the PeopleTrax UI.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/marks_view_zoom_border_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/marks_view_zoom_border_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=205 alt=marks_view_zoom_border src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/marks_view_zoom_border_thumb.png" width=519 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/marks_view_zoom_border_thumb.png"&gt;&lt;/A&gt; &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;I can use the marks to filter the report to only show profiling data for the time between the two inserted marks and then start my performance investigation.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/filter_on_marks_border_4.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/filter_on_marks_border_4.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=296 alt=filter_on_marks_border src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/filter_on_marks_border_thumb_1.png" width=495 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/InsertingMarksUsingCode_10AFE/filter_on_marks_border_thumb_1.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8569496" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.msdn.com/colinth/archive/tags/dev/default.aspx">dev</category></item><item><title>Performance: Find Application Bottlenecks With Visual Studio Profiler</title><link>http://blogs.msdn.com/colinth/archive/2008/03/13/performance-find-application-bottlenecks-with-visual-studio-profiler.aspx</link><pubDate>Thu, 13 Mar 2008 20:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8182701</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/8182701.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=8182701</wfw:commentRss><description>&lt;P&gt;If you're a subscriber to &lt;A class="" href="http://msdn2.microsoft.com/en-us/magazine/default.aspx" mce_href="http://msdn2.microsoft.com/en-us/magazine/default.aspx"&gt;msdn magazine&lt;/A&gt;,&amp;nbsp;take a look at the article in the March 2008, Vol 23, No 4 issue on Page 81 which describes how to use the Visual Studio 2008 profiler to improve the performance of an application. A couple of members of the profiler team examine a Mandelbrot fractal drawing program in some detail. They isolate and fix several performance problems in the code, speeding up program execution approximately tenfold.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt; You can read the article &lt;A class="" href="http://msdn2.microsoft.com/en-us/magazine/cc337887.aspx" mce_href="http://msdn2.microsoft.com/en-us/magazine/cc337887.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8182701" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item><item><title>Noise Reduction in the VS2008 Profiler</title><link>http://blogs.msdn.com/colinth/archive/2008/01/31/noise-reduction-in-vs2008.aspx</link><pubDate>Fri, 01 Feb 2008 04:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7363521</guid><dc:creator>colinth</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/colinth/comments/7363521.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=7363521</wfw:commentRss><description>&lt;P align=left&gt;One of the new profiler features in Visual Studio Team System (VS2008) is called Noise Reduction. This feature is intended to make it easier to review the Call Tree view by reducing the amount of data that is displayed, while still showing the most important functions.&lt;/P&gt;
&lt;P align=left&gt;To illustrate this new feature I wrote a very simple native C++ application that utilizes &lt;A href="http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx" mce_href="http://blogs.msdn.com/vcblog/archive/2008/01/08/q-a-on-our-tr1-implementation.aspx"&gt;TR1 in the Feature Pack Beta&lt;/A&gt;. In this simple app I create some shared_ptrs in a for loop after calling a recursive function a few times. If you're not familiar with TR1 take a look at the VC blog for more information.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   1:&lt;/SPAN&gt; #include &amp;lt;tchar.h&amp;gt;&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   2:&lt;/SPAN&gt; #include &amp;lt;memory&amp;gt;&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   3:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   4:&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;class&lt;/SPAN&gt; A&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   5:&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   6:&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;public&lt;/SPAN&gt;:&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   7:&lt;/SPAN&gt;     A(&lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; v, &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; w) : b(v), c(w)&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   8:&lt;/SPAN&gt;     {}&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;   9:&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;private&lt;/SPAN&gt;:&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  10:&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; b;&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  11:&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; c;&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  12:&lt;/SPAN&gt; };&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  13:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  14:&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;void&lt;/SPAN&gt; recurse(&lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; v)&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  15:&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  16:&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; (v &amp;gt; 0)&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  17:&lt;/SPAN&gt;     {&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  18:&lt;/SPAN&gt;         recurse(--v);&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  19:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  20:&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #0000ff"&gt;else&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  21:&lt;/SPAN&gt;     {&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  22:&lt;/SPAN&gt;         A someA(1,2);&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  23:&lt;/SPAN&gt;         &lt;SPAN style="COLOR: #0000ff"&gt;for&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; i=0; i &amp;lt; 100; ++i)&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  24:&lt;/SPAN&gt;         {&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  25:&lt;/SPAN&gt;             std::tr1::shared_ptr&amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt;&amp;gt; a(&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt;(2));&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  26:&lt;/SPAN&gt;             std::tr1::shared_ptr&amp;lt;A&amp;gt; b(&lt;SPAN style="COLOR: #0000ff"&gt;new&lt;/SPAN&gt; A(2,3));&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  27:&lt;/SPAN&gt;             std::tr1::shared_ptr&amp;lt;A&amp;gt; c(b);&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  28:&lt;/SPAN&gt;         }&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  29:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  30:&lt;/SPAN&gt; }&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  31:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  32:&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; _tmain(&lt;SPAN style="COLOR: #0000ff"&gt;int&lt;/SPAN&gt; argc, _TCHAR* argv[])&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  33:&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  34:&lt;/SPAN&gt;     recurse(5);&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  35:&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #0000ff"&gt;return&lt;/SPAN&gt; 0;&lt;/PRE&gt;&lt;PRE style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;SPAN style="COLOR: #606060"&gt;  36:&lt;/SPAN&gt; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P align=left mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align=left&gt;I profiled the application using Instrumentation Mode as shown below. Shifting to 'Call Tree' view and expanding I see my main function, which calls recurse 6 times (the initial call from main plus 5 recursive calls from inside the if statement in recurse). There are also a lot of other calls that have very little inclusive time (e.g. __RTC_CheckESP).&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/default_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/default_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=480 alt=default src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/default_thumb.png" width=620 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/default_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=center mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align=left&gt;To reduce the noise in the call tree I choose to enable noise reduction by clicking on the icon on the far right of the toolbar (it looks like a checklist). In the dialog I enable trimming, using a threshold of 3%.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim_dlg_2.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim_dlg_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=345 alt=trim_dlg src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim_dlg_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim_dlg_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=left mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align=left&gt;After enabling this option I expand the call tree again and many of the extra calls are gone and the calls to recurse are much easier to see as shown below.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=480 alt=trim src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim_thumb.png" width=620 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/trim_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still think I can do a little better so I open up the Noise Reduction dialog again and 'Enable Folding'.&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_dlg_6.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_dlg_6.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=345 alt=fold_dlg src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_dlg_thumb_2.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_dlg_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=left mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align=left&gt;The resulting call tree can now be completely expanded and shown without scroll bars. I can see that functions that have significant exclusive time include: __security_init_cookie (28.40%), shared_ptr setup for A, (10.23%), shared_ptr refcount destructor (11.30%) &amp;amp; the last call to recurse (7.58%). &lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_4.png" mce_href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_4.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=480 alt=fold src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_thumb_1.png" width=620 border=0 mce_src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/d85253334288_D1EF/fold_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=center mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align=left&gt;Using Noise Reduction in a larger application should make it easier for you to find performance problems.&lt;/P&gt;
&lt;P align=left&gt;Details:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;Trimming removes leaf nodes in the call tree that have Elapsed Inclusive Time % (or Inclusive Sample % if you use sampling mode) lower than the threshold.&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;Folding combines (folds) a child node up to its parent node if it is the only child and the Elapsed Inclusive Time % (or Inclusive Sample % if you use sampling mode) is within Threshold of its parent. The intention is to fold simple forwarding functions that don't have much influence on the performance of your code.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P align=left&gt;Trimming is applied first and then folding, which is why the calls to recurse are all folded.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7363521" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item><item><title>Visual Studio Team System Chat – December 5th</title><link>http://blogs.msdn.com/colinth/archive/2007/11/21/visual-studio-team-system-chat-december-5th.aspx</link><pubDate>Wed, 21 Nov 2007 22:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6458339</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/6458339.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=6458339</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Join members of the Visual Studio Team System product group to discuss features available in Team Foundation Server, Team Suite, Architecture Edition, Development Edition, Database Edition, and Test Edition. In addition, discuss what's new for these editions for Visual Studio 2008.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;We will be holding two sessions:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Join the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/chats" mce_href="http://msdn.microsoft.com/chats"&gt;&lt;FONT face="Times New Roman" size=3&gt;chat&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; on Wednesday, December 5th, 2007 from 10:00am - 11:00am Pacific Time. &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/communities/chats/vcs/07_1205_msdn_VSTS10.ics" mce_href="http://www.microsoft.com/communities/chats/vcs/07_1205_msdn_VSTS10.ics"&gt;&lt;FONT face="Times New Roman" size=3&gt;Add to Calendar&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; | &lt;/FONT&gt;&lt;A href="http://www.timeanddate.com/worldclock/fixedtime.html?month=12&amp;amp;day=5&amp;amp;year=2007&amp;amp;hour=10&amp;amp;min=0&amp;amp;sec=0&amp;amp;p1=234" mce_href="http://www.timeanddate.com/worldclock/fixedtime.html?month=12&amp;amp;day=5&amp;amp;year=2007&amp;amp;hour=10&amp;amp;min=0&amp;amp;sec=0&amp;amp;p1=234"&gt;&lt;FONT face="Times New Roman" size=3&gt;Additional Time Zones&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;BR&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;-and-&lt;BR style="mso-special-character: line-break"&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Join the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/chats" mce_href="http://msdn.microsoft.com/chats"&gt;&lt;FONT face="Times New Roman" size=3&gt;chat&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; on Wednesday, December 5th, 2007 from 4:00pm - 5:00pm Pacific Time. &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/communities/chats/vcs/07_1205_msdn_VSTS4.ics" mce_href="http://www.microsoft.com/communities/chats/vcs/07_1205_msdn_VSTS4.ics"&gt;&lt;FONT face="Times New Roman" size=3&gt;Add to Calendar&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; | &lt;/FONT&gt;&lt;A href="http://www.timeanddate.com/worldclock/fixedtime.html?month=12&amp;amp;day=5&amp;amp;year=2007&amp;amp;hour=16&amp;amp;min=0&amp;amp;sec=0&amp;amp;p1=234" mce_href="http://www.timeanddate.com/worldclock/fixedtime.html?month=12&amp;amp;day=5&amp;amp;year=2007&amp;amp;hour=16&amp;amp;min=0&amp;amp;sec=0&amp;amp;p1=234"&gt;&lt;FONT face="Times New Roman" size=3&gt;Additional Time Zones&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;---&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;I'll be in the Wed 4 pm - 5 pm chat to answer any questions related to profiling. Another member of the profiler team will be online for the earlier chat.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;---&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6458339" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.msdn.com/colinth/archive/tags/dev/default.aspx">dev</category></item><item><title>Microsoft Blogs I Read</title><link>http://blogs.msdn.com/colinth/archive/2007/10/16/microsoft-blogs-i-read.aspx</link><pubDate>Tue, 16 Oct 2007 21:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5407961</guid><dc:creator>colinth</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/colinth/comments/5407961.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=5407961</wfw:commentRss><description>&lt;P&gt;There are a lot of Microsoft bloggers, literally thousands of them. When I first joined Microsoft I wasn't sure who to read. I've gradually built up a list based on interesting product and feature announcements and people I've met. Here they are:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Profiling&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/profiler" mce_href="http://blogs.msdn.com/profiler"&gt;Our Team Blog&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/ianhu" mce_href="http://blogs.msdn.com/ianhu"&gt;IanWho's Blog&lt;/A&gt;. Written by a fellow dev on the profiler team, Ian has probably written the most about profiling across the team.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/ms_joc/" mce_href="http://blogs.msdn.com/ms_joc/"&gt;joc's bLog&lt;/A&gt;. Written by my bosses' boss.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/mgoldin/" mce_href="http://blogs.msdn.com/mgoldin/"&gt;mgoldin's blog&lt;/A&gt;. Written by a senior dev on my team. Find out about the difference between different types of samples etc.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/chrissc/" mce_href="http://blogs.msdn.com/chrissc/"&gt;My Code Does What?!&lt;/A&gt;. A relatively new blog about profiling by another fellow dev.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/scarroll" mce_href="http://blogs.msdn.com/scarroll"&gt;scarroll's Blog&lt;/A&gt;. Written by my boss.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Technical&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/bharry/default.aspx" mce_href="http://blogs.msdn.com/bharry/default.aspx"&gt;bharry's WebLog&lt;/A&gt;. Written by a Technical Fellow (&lt;A class="" href="http://blogs.msdn.com/anutthara/archive/2007/08/17/brian-harry-is-now-technical-fellow.aspx" mce_href="http://blogs.msdn.com/anutthara/archive/2007/08/17/brian-harry-is-now-technical-fellow.aspx"&gt;read more about this&lt;/A&gt;) with a huge amount of experience who has a big focus on TFS.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/greggm" mce_href="http://blogs.msdn.com/greggm"&gt;Greggm's Weblog&lt;/A&gt;. Written by a senior dev on the Debugger team. Has many advanced debugger tips.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.technet.com/markrussinovich/" mce_href="http://blogs.technet.com/markrussinovich/"&gt;Mark Russinovich&lt;/A&gt;. Mark wrote some cool &lt;A class="" href="http://www.microsoft.com/technet/sysinternals/default.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/default.mspx"&gt;Sysinternals tools&lt;/A&gt; and now blogs some fascinating posts about his investigation into problems he finds everyday just using his PC.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/ricom" mce_href="http://blogs.msdn.com/ricom"&gt;Rico Mariani's Performance Tidbits&lt;/A&gt;. Written by a senior Microsoftie who has been here for a long time. Gives tips for analyzing performance and provides guidelines to use in writing .NET code.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://weblogs.asp.net/scottgu" mce_href="http://weblogs.asp.net/scottgu"&gt;ScottGu's Blog&lt;/A&gt;. Find out about LINQ, ASP.NET AJAX etc. etc. This blog has many examples including screenshots and source code.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/somasegar/default.aspx" mce_href="http://blogs.msdn.com/somasegar/default.aspx"&gt;Somasegar's WebLog&lt;/A&gt;.&amp;nbsp;As the corporate VP of DevDiv, Soma covers a lot of Visual Studio features and other developer tools.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Other&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A class="" href="http://internationaltechjobs.spaces.live.com/" mce_href="http://internationaltechjobs.spaces.live.com"&gt;Microsoft International Tech Jobs&lt;/A&gt;. I keep an eye on&amp;nbsp;Microsoft's international opportunities here.&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/jobsblog" mce_href="http://blogs.msdn.com/jobsblog"&gt;Microsoft's JobsBlog&lt;/A&gt;. Discusses many aspects of Microsoft's recruiting. Covers the Vancouver office developments and has tips for prospective Microsofties.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;That's just some of the Microsoft blogs I read. Are there other 'must-reads' that I'm missing?&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5407961" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.msdn.com/colinth/archive/tags/dev/default.aspx">dev</category></item><item><title>Visual Studio 2008, Beta 2 (now with some of my code)</title><link>http://blogs.msdn.com/colinth/archive/2007/07/27/visual-studio-2008-beta-2-now-with-some-of-my-code.aspx</link><pubDate>Fri, 27 Jul 2007 09:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4075708</guid><dc:creator>colinth</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/colinth/comments/4075708.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=4075708</wfw:commentRss><description>&lt;P&gt;Today we &lt;A href="http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx"&gt;released Beta 2&lt;/A&gt; of VS2008. This is the first public release from Microsoft that contains a nontrivial amount of code that I wrote (even though I haven't written too much code just yet). I had barely synched up the source tree and only fixed a couple of bugs when we released Beta 1 but now I've found my feet and am contributing more.&lt;/P&gt;
&lt;P&gt;The major release announcements have focussed on the flashier (and admittedly very cool) aspects of the Beta like &lt;A href="http://en.wikipedia.org/wiki/Language_Integrated_Query" mce_href="http://en.wikipedia.org/wiki/Language_Integrated_Query"&gt;LINQ&lt;/A&gt; and some of the HTML editing and Javascript debugging features. However, us Profiler folks have also been toiling away adding new features and fixing bugs. Look out for things like (and some of these already featured in Beta 1, but they just keep getting better):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A promotion to the new Developer menu&lt;BR&gt;&amp;nbsp;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VisualStudio2008Beta2nowwithsomeofmycode_F35B/dev_menu_2.png" atomicselection="true"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" alt=dev_menu src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VisualStudio2008Beta2nowwithsomeofmycode_F35B/dev_menu_thumb_2.png" border=0&gt;&lt;/A&gt; &lt;BR&gt;
&lt;LI&gt;Hot path - find the critical path/paths through your call trees&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VisualStudio2008Beta2nowwithsomeofmycode_F35B/hotpath.png" atomicselection="true"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=139 alt=hotpath src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VisualStudio2008Beta2nowwithsomeofmycode_F35B/hotpath_thumb.png" width=776 border=0&gt;&lt;/A&gt; 
&lt;LI&gt;Noise reduction - trim and/or fold your call trees so that they are easier to examine. See above for folding example. 
&lt;LI&gt;Comparison reports - compare subsequent profiler runs to determine if code changes are improving performance&lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VisualStudio2008Beta2nowwithsomeofmycode_F35B/comparison_reps.png" atomicselection="true"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=94 alt=comparison_reps src="http://blogs.msdn.com/blogfiles/colinth/WindowsLiveWriter/VisualStudio2008Beta2nowwithsomeofmycode_F35B/comparison_reps_thumb.png" width=275 border=0&gt;&lt;/A&gt; 
&lt;LI&gt;x64 OS support - profile on x64 Vista or W2K3 server&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you can, please download it and let us know what you think. If you don't have the time at least take a look at the &lt;SPAN style="TEXT-DECORATION: underline"&gt;&lt;/SPAN&gt;&lt;A href="http://channel9.msdn.com/showpost.aspx?postid=329443" mce_href="http://channel9.msdn.com/showpost.aspx?postid=329443"&gt;overview video&lt;/A&gt; showing some of the major features. You should also check out Ian's entry about &lt;A href="http://blogs.msdn.com/ianhu/archive/2007/07/17/the-visual-studio-profiler-data-collection-control-part-1-excluding-application-startup-time.aspx" mce_href="http://blogs.msdn.com/ianhu/archive/2007/07/17/the-visual-studio-profiler-data-collection-control-part-1-excluding-application-startup-time.aspx"&gt;controlling data collection while profiling&lt;/A&gt;. Hopefully I'll have time to go through some of the new profiler-specific features soon.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4075708" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item><item><title>Tech-Ed 2007</title><link>http://blogs.msdn.com/colinth/archive/2007/06/03/tech-ed-2007.aspx</link><pubDate>Sun, 03 Jun 2007 19:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3065935</guid><dc:creator>colinth</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/colinth/comments/3065935.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=3065935</wfw:commentRss><description>&lt;P&gt;&lt;A class="" href="http://www.microsoft.com/events/teched2007/default.mspx" mce_href="http://www.microsoft.com/events/teched2007/default.mspx"&gt;Tech-Ed 2007&lt;/A&gt; is starting tomorrow and the &lt;A class="" href="http://blogs.msdn.com/profiler" mce_href="http://blogs.msdn.com/profiler"&gt;Profiler Team&lt;/A&gt; is sending a few people to sunny Orlando for the event. This is great news for me because my boss, &lt;A class="" href="http://blogs.msdn.com/scarroll/" mce_href="http://blogs.msdn.com/scarroll/"&gt;Steve Carroll&lt;/A&gt;, is away for the week (just kidding Steve), but it is really great news for folks at Tech Ed because he'll be there presenting with Marc Popkin-Paine:&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class=MsoNormalTable style="WIDTH: 709px; BORDER-COLLAPSE: collapse; HEIGHT: 40px; mso-yfti-tbllook: 1184; mso-padding-alt: 3.0pt 3.0pt 3.0pt 3.0pt" cellSpacing=0 cellPadding=0 width=709 border=1 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3pt; PADDING-BOTTOM: 3pt; BORDER-LEFT: #ece9d8; PADDING-TOP: 3pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;DEV313 - Improving Code Performance with Microsoft Visual Studio Team System&amp;nbsp;&amp;nbsp;[N210 E]&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3pt; PADDING-BOTTOM: 3pt; BORDER-LEFT: #ece9d8; WIDTH: 37.5pt; PADDING-TOP: 3pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=50&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;June 07&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3pt; PADDING-BOTTOM: 3pt; BORDER-LEFT: #ece9d8; WIDTH: 37.5pt; PADDING-TOP: 3pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=50&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;9:45 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 3pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 3pt; PADDING-BOTTOM: 3pt; BORDER-LEFT: #ece9d8; WIDTH: 45.5pt; PADDING-TOP: 3pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=50&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;11:00 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;I believe they'll be demoing a few&amp;nbsp;new&amp;nbsp;Orcas features and giving a pretty&amp;nbsp;good introduction to profiling. If you didn't know Visual Studio Team System &lt;A class="" href="http://blogs.msdn.com/colinth/archive/2007/04/12/there-s-a-profiler-in-visual-studio.aspx" mce_href="http://blogs.msdn.com/colinth/archive/2007/04/12/there-s-a-profiler-in-visual-studio.aspx"&gt;has a profiler&lt;/A&gt;, or you don't think &lt;A class="" href="http://blogs.msdn.com/colinth/archive/2007/04/18/why-performance-matters.aspx" mce_href="http://blogs.msdn.com/colinth/archive/2007/04/18/why-performance-matters.aspx"&gt;performance is important&lt;/A&gt;, you should definitely check this out.&lt;/P&gt;
&lt;P mce_keep="true"&gt;If you're not lucky enough to be able to make it to Orlando this year, be sure to take a look at &lt;A class="" href="http://www.virtualteched.com/Pages/default.aspx#" mce_href="http://www.virtualteched.com/Pages/default.aspx#"&gt;Virtual Tech Ed&lt;/A&gt;, which will include webcasts and other content from some of the sessions. One that jumps out at me is &lt;A href="http://www.microsoft.com/events/EventDetails.aspx?CMTYSvcSource=MSCOMMedia&amp;amp;Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22ID%22+Value%3d%221032340706%22%2f%5e%7earg+Name%3d%22ProviderID%22+Value%3d%22A6B43178-497C-4225-BA42-DF595171F04C%22%2f%5e%7earg+Name%3d%22lang%22+Value%3d%22en%22%2f%5e%7earg+Name%3d%22cr%22+Value%3d%22US%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e"&gt;MSDN Webcast: A Lap around Microsoft Visual Studio Code Name "Orcas" (Level 200)&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;UPDATE: Steve is already &lt;A class="" href="http://peterkellner.net/2007/06/04/teched2007a/" mce_href="http://peterkellner.net/2007/06/04/teched2007a/"&gt;helping people&lt;/A&gt; at Tech Ed. If you're there and you're interested in performance go and have a chat with him in the Technical Learning Center.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3065935" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category></item><item><title>Learning to Profile</title><link>http://blogs.msdn.com/colinth/archive/2007/05/21/learning-profiling.aspx</link><pubDate>Tue, 22 May 2007 01:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2777198</guid><dc:creator>colinth</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/colinth/comments/2777198.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=2777198</wfw:commentRss><description>&lt;P&gt;I went to a meeting with &lt;A class="" href="http://blogs.msdn.com/ricom" mce_href="http://blogs.msdn.com/ricom"&gt;Rico&lt;/A&gt; the other day and he showed us a few approaches he uses when solving performance issues. He is a performance engineer with many years of experience so it really was a case of watch and learn. This got me thinking about how people can best learn to use performance tools.&lt;/P&gt;
&lt;P&gt;One starting point in this process is to consider my own experience learning a more mature dynamic code analysis&amp;nbsp;tool - the debugger. Think back to the first time you ever started up a program running under a debugger. What was the first thing you did? My first debugging experience went something like this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Set a breakpoint at the beginning of main() - this was C/C++ afterall.&lt;/LI&gt;
&lt;LI&gt;Run the code in the debugger. Hey, it stopped. cool.&lt;/LI&gt;
&lt;LI&gt;Step through a few lines of code and inspect the values of some local variables.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Sit back and think that's pretty cool - maybe I'll have to use a few less printfs to work out what's going on with my program. That's pretty much it. Gradually I learnt more and more about things like:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The difference between Step In, Step Over, Step Out, Run to Cursor&lt;/LI&gt;
&lt;LI&gt;The value of different types of breakpoints like conditional breakpoints, data&amp;nbsp;breakpoints etc.&lt;/LI&gt;
&lt;LI&gt;The value of the&amp;nbsp;Watch window.&amp;nbsp;I'm still surprised&amp;nbsp;by how much you customize the output&amp;nbsp;to make it easier to find issues.&lt;/LI&gt;
&lt;LI&gt;The various other windows - threads, memory, etc. etc.&lt;/LI&gt;
&lt;LI&gt;Etc.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;It took a long to discover some of these features. It took even longer to use them almost automatically while debugging.&lt;/P&gt;
&lt;P&gt;Obviously the learning curve depends a lot upon the tool you use. Visual Studio tries to be more intuitive and easy to use than something like WinDbg, which is a command-line tool. Even with the ease of use of the visual debugger, you still need to know the typical debugging pattern (using breakpoints) before you can use the tool effectively.&lt;/P&gt;
&lt;P&gt;Fewer people have used code profilers than debuggers and the tools are still less mature than their debugger equivalents, so it is harder for new programmers to profile their code than to debug it. In an ideal world we might have a 'fix my code' button or at the very least a 'highlight problem code lines' feature, but for now we need to develop patterns that developers can use to do this themselves.&lt;/P&gt;
&lt;P&gt;What features would make profiling easier for you? Are we missing a fundamental concept (the equivalent of 'set breakpoint' in debugging land)&amp;nbsp;that would make things so much easier?&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2777198" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category></item><item><title>Basic Profiler Scenarios</title><link>http://blogs.msdn.com/colinth/archive/2007/05/07/basic-profiler-scenarios.aspx</link><pubDate>Mon, 07 May 2007 23:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2467808</guid><dc:creator>colinth</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/colinth/comments/2467808.aspx</comments><wfw:commentRss>http://blogs.msdn.com/colinth/commentrss.aspx?PostID=2467808</wfw:commentRss><description>&lt;P&gt;This post was going to cover some basic scenarios discussing the differences between sampling and instrumentation and when you would choose to switch methods, but then I found there is already &lt;A href="http://msdn2.microsoft.com/en-us/library/ms182398(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms182398(VS.80).aspx"&gt;something like that in MSDN&lt;/A&gt;. If you haven't already, go and take a look. See if you can improve the performance of the PeopleTrax app.&lt;/P&gt;
&lt;P&gt;Instead I'll discuss sampling and instrumentation from a user's perspective. There are already many definitions of &lt;A href="http://search.live.com/results.aspx?q=sampling++instrumentation+site%3Amsdn.com&amp;amp;form=QBRE" mce_href="http://search.live.com/results.aspx?q=sampling++instrumentation+site%3Amsdn.com&amp;amp;form=QBRE"&gt;sampling vs instrumentation&lt;/A&gt;&amp;nbsp;so I won't repeat them.&lt;/P&gt;
&lt;P&gt;For some background reading on the sampling aspect, take a look at David Gray's &lt;A href="http://blogs.msdn.com/graycode/archive/2005/12/08/DebuggerAsProfiler.aspx" mce_href="http://blogs.msdn.com/graycode/archive/2005/12/08/DebuggerAsProfiler.aspx"&gt;post&lt;/A&gt;. There are a few things that he hasn't covered in that post.&amp;nbsp;The main question I had was &lt;EM&gt;should I use sampling or instrumentation&lt;/EM&gt;?&lt;/P&gt;
&lt;P&gt;A generic answer to that would be:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If you know your performance problem is CPU-related (i.e. you see the CPU is running at or near 100% in task manager) then you should probably start with sampling.&lt;/LI&gt;
&lt;LI&gt;If you suspect your problem may be related to resource contention (e.g. locks, network, disk etc), instrumentation would be a better starting point.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Sometimes you may not be sure what type of performance issue you are facing or you may be trying to resolve several types of issues. Read on for more details.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sampling&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Why use sampling instead of instrumentation?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Sampling is lighter weight than instrumentation (see below for reasons why instrumentation is more resouce intensive) and you don't need to change your executable/binaries to use sampling.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;What events&amp;nbsp;do you sample with?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;By default the profiler samples&amp;nbsp;with clock cycles. This should be familiar to most users because they relate to the commonly quoted frequency of the machine. For example, 1 GHz is 1 billion clock cycles / second. If you use the default profiler setting for clock cycles that would mean 100 samples every second on a 1 GHz machine.&lt;/P&gt;
&lt;P&gt;Alternatively, you could choose to sample using Page Faults, which might occur frequently if you are allocating/deallocating memory a lot. You could also choose to profile using system calls or some lower level counter.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;How many samples is enough to accurately represent my program profile?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;This is not a simple question to answer. By default we only sample every 10000000 clock cycles, which might seem like a long time between samples. In that time, your problematic code might block waiting on a lock or some other construct and the thread it is running in might be pre-empted allowing another thread to run. When the next sample is taken&amp;nbsp;the other thread&amp;nbsp;could still be running&amp;nbsp;which means the problematic code is not included in the sample.&lt;/P&gt;
&lt;P&gt;The risk of missing the key data is something that is inherent in any sample-based data collection. In statistics&amp;nbsp;the approach is to minimize the risk of missing key information by making the number of samples large&amp;nbsp;enough relative to the&amp;nbsp;general population. For example, if you have a demographic that includes 10000 people, taking only 1 sample is unlikely to be representative. Taking a sample of 1000 people might be considered representative. There are more links about this on &lt;A href="http://en.wikipedia.org/wiki/Sampling_(statistics)" mce_href="http://en.wikipedia.org/wiki/Sampling_(statistics)"&gt;Wikipedia&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Won't this slow down my app?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;No, not really. When a sample is taken the current thread is suspended (other application threads continue to run) so that the current call stack can be collected. When the stack walk is finished, execution returns to the application thread. Sampling should have a limited effect on most applications.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Sounds good, why use instrumentation?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;See below.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Instrumentation&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Why use instrumentation?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;As discussed above, sampling doesn't always give you the whole picture. If you really want to know what is going on with a program the most complete way is to keep track of every single call to every function.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;How does instrumentation work (briefly)?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Unlike sampling, with instrumentation the profiler changes the binary by inserting special pieces of code called probes&amp;nbsp;at the start and end of each function. This process is called 'instrumenting the binary' and it works by taking a binary (dll or exe) along with its PDB and making a new 'instrumented binary'. By comparing a counter at the end of the function with the start, it is easy to determine how long a function took to execute.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;What if I call other people's code?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Usually you don't have access to the PDB files for other people's code which means you can't instrument it. Fortunately&amp;nbsp;as part of the instrumentation process the profiler inserts special probes around each call to an external function so that you can track these calls (although not any functions that they might call).&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Why not just use Instrumentation all the time?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Computers execute a lot of instructions in 10000000 clock cycles, so using instrumentation can generate a LOT of data compared with sampling. The process of calling the probe functions in&amp;nbsp;an application thread can also degrade performance more than sampling would.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2467808" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/colinth/archive/tags/profiler/default.aspx">profiler</category><category domain="http://blogs.msdn.com/colinth/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item></channel></rss>