<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">My Code Does What?!</title><subtitle type="html">Software performance, profiling, and design</subtitle><id>http://blogs.msdn.com/chrissc/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/chrissc/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-06-06T02:10:00Z</updated><entry><title>Visual Studio 2010 Beta 2 Available Now!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2009/10/22/visual-studio-2010-beta-2-available-now.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2009/10/22/visual-studio-2010-beta-2-available-now.aspx</id><published>2009-10-22T21:00:43Z</published><updated>2009-10-22T21:00:43Z</updated><content type="html">&lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="vs2010" border="0" alt="vs2010" align="right" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/vs2010_6.png" width="240" height="48" /&gt;On Monday, we released &lt;a href="http://go.microsoft.com/fwlink/?LinkID=151797"&gt;Visual Studio 2010 and .NET Framework 4 Beta 2&lt;/a&gt; to the web!&amp;#160; In the new, simplified product lineup, you will find the profiler in the Premium and Ultimate editions.&lt;/p&gt;  &lt;p&gt;We’ve made a lot of progress since Beta 1 with the profiler and with the product in general.&amp;#160; We would love to get your feedback and impressions on it:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Post issues and questions in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vsprerelease"&gt;Beta 2 support forums&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Submit bugs or suggestions through &lt;a href="https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=14631"&gt;Microsoft Connect&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Tweet your experiences with the &lt;a href="http://search.twitter.com/search?q=%23vs2010"&gt;#vs2010&lt;/a&gt; tag &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Our Beta 1 feature blogging was put on hold in favor of fixing bugs, so as we inch closer to RTM, we will be posting in-depth information about the new goodness in the profiler as a part of Visual Studio 2010.&lt;/p&gt;  &lt;p&gt;Until then, I leave you with a little more screenshot love :) (click to embiggen)&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/summary-page_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="summary-page" border="0" alt="summary-page" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/summary-page_thumb_1.png" width="404" height="257" /&gt;&lt;/a&gt;       &lt;br /&gt;Fig 1. New summary page.       &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align="center"&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/function-details_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="function-details" border="0" alt="function-details" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/function-details_thumb_1.png" width="404" height="257" /&gt;&lt;/a&gt;&lt;em&gt;      &lt;br /&gt;Fig 2. Function details view.       &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/contentions_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="contentions" border="0" alt="contentions" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/contentions_thumb_2.png" width="404" height="252" /&gt;&lt;/a&gt;       &lt;br /&gt;Fig 3. Thread contention view.       &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/tip_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tip" border="0" alt="tip" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/tip_thumb_2.png" width="404" height="254" /&gt;&lt;/a&gt;       &lt;br /&gt;Fig 4. Tier interactions view.       &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/wizard_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="wizard" border="0" alt="wizard" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/wizard_thumb.png" width="404" height="347" /&gt;&lt;/a&gt;       &lt;br /&gt;Fig 5. Performance wizard.&lt;/em&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/debug-menu_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="debug-menu" border="0" alt="debug-menu" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudio2010Beta2Available_10EED/debug-menu_thumb.png" width="404" height="309" /&gt;&lt;/a&gt;       &lt;br /&gt;Fig 6. We’re on the Debug menu! I &amp;lt;3 Alt+F2.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911688" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Visual Studio 2008 AJAX Profiling Extensions Power Tool</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2009/04/29/visual-studio-2008-ajax-profiling-extensions-power-tool.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2009/04/29/visual-studio-2008-ajax-profiling-extensions-power-tool.aspx</id><published>2009-04-30T05:56:38Z</published><updated>2009-04-30T05:56:38Z</updated><content type="html">&lt;p&gt;Originating in Microsoft Research as &lt;a href="http://research.microsoft.com/en-us/projects/ajaxview/"&gt;Ajax View&lt;/a&gt;, the Visual Studio 2008 AJAX Profiling Extensions Power Tool &lt;a href="http://blogs.msdn.com/somasegar/archive/2009/04/29/vs2008-ajax-profiling-extensions.aspx"&gt;was released today&lt;/a&gt; (&lt;a href="http://code.msdn.microsoft.com/AjaxView/Release/ProjectReleases.aspx?ReleaseId=2594"&gt;download here&lt;/a&gt;).&amp;#160; It’s a JavaScript performance profiler with a novel approach: it modifies the code sent by your server to include diagnostic code to trace and time function execution.&amp;#160; The client browser then sends profiling data back to your server for aggregation and analysis as the JavaScript executes.&amp;#160; Once you’ve collected your data, you can install the power tool extensions for VS2008 Team Developer or Team Suite to view and analyze the results using the Visual Studio Profiler’s UI.&lt;/p&gt;  &lt;p&gt;The benefit of the server-side instrumentation approach is that it works with any client browser, letting you see how various browsers affect your performance.&amp;#160; On the server, you must be running IIS7 with an integrated pipeline.&amp;#160; Currently, running this power tool on production servers is not recommended.&lt;/p&gt;  &lt;p&gt;Between this power tool, the built-in &lt;a href="http://blogs.msdn.com/ie/archive/2008/09/11/introducing-the-ie8-developer-tools-jscript-profiler.aspx"&gt;IE8 JavaScript profiler&lt;/a&gt;, and the integration with Visual Studio, we hope to shine much needed light on client-side browser performance.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9577941" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Website Performance Talk at MIX09</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2009/04/21/website-performance-talk-at-mix09.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2009/04/21/website-performance-talk-at-mix09.aspx</id><published>2009-04-21T21:19:24Z</published><updated>2009-04-21T21:19:24Z</updated><content type="html">&lt;p&gt;John Hrvatin, lead program manager on the IE team, recently gave a talk at MIX09 entitled &lt;a href="http://videos.visitmix.com/MIX09/T53F"&gt;“Building High Performance Web Applications and Sites”&lt;/a&gt; (see the presentation key below).&amp;#160; John goes over a number of common performance pitfalls encountered when developing websites with CSS and JavaScript as well as some issues you might encounter at the HTTP level.&amp;#160; Some of the presentation’s content can be found in Steve Souders’ &lt;a href="http://oreilly.com/catalog/9780596529307/"&gt;High Performance Web Sites&lt;/a&gt; book, but John goes more in depth on JavaScript issues and where IE8 has addressed specific problems.&lt;/p&gt;  &lt;p&gt;John also gives a demo of &lt;a href="http://blogs.msdn.com/ie/archive/2008/09/11/introducing-the-ie8-developer-tools-jscript-profiler.aspx"&gt;IE8’s new JavaScript profiler&lt;/a&gt; which gives you absolute timings and call counts for your JavaScript functions.&amp;#160; This is a great first step, giving you the raw data you need in order to see where time is being spent in the browser.&amp;#160; To jump right in with IE8’s JavaScript profiler, check out the &lt;a href="http://msdn.microsoft.com/en-us/ie/dd490714.aspx"&gt;“How Do I: JavaScript Profiler”&lt;/a&gt; video.&lt;/p&gt;  &lt;p&gt;Integrated JavaScript profiling will also ship with Visual Studio 2010, though you’ll get a richer analysis and reporting experience with tools like hot path, call tree trimming and folding, .csv and .xml exporting, VS IDE integration, and the function details and caller/callee views.&amp;#160; A future blog post will go more in depth on this.&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;Presentation Key&lt;/em&gt;&lt;/p&gt; &lt;center&gt;   &lt;table class="key" border="0" cellspacing="0" cellpadding="2"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;th valign="top"&gt;Time&lt;/td&gt; &lt;/th&gt;          &lt;th valign="top"&gt;Topic&lt;/td&gt; &lt;/tr&gt;&lt;/th&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top"&gt;00:00&lt;/td&gt;          &lt;td valign="top"&gt;Intro, motivation&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top"&gt;05:53&lt;/td&gt;          &lt;td valign="top"&gt;CSS performance            &lt;ul&gt;             &lt;li&gt;05:53 – Minimize included styles &lt;/li&gt;              &lt;li&gt;06:57 – Simplify selectors &lt;/li&gt;              &lt;li&gt;09:14 – Don’t use expressions &lt;/li&gt;              &lt;li&gt;10:09 – Minimize page re-layouts &lt;/li&gt;           &lt;/ul&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top"&gt;13:14&lt;/td&gt;          &lt;td valign="top"&gt;Optimizing JavaScript symbol resolution            &lt;ul&gt;             &lt;li&gt;14:01 – Lookup chains &lt;/li&gt;              &lt;li&gt;15:53 – Local variables &lt;/li&gt;              &lt;li&gt;16:52 – Implicit lookups &lt;/li&gt;              &lt;li&gt;18:10 – Multiple DOM lookups &lt;/li&gt;              &lt;li&gt;18:51 – Function lookups &lt;/li&gt;           &lt;/ul&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top"&gt;20:10&lt;/td&gt;          &lt;td valign="top"&gt;Demo - Internet Explorer 8 JavaScript Profiler&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top"&gt;23:44&lt;/td&gt;          &lt;td valign="top"&gt;JavaScript coding inefficiencies            &lt;ul&gt;             &lt;li&gt;23:44 – Parsing JSON &lt;/li&gt;              &lt;li&gt;26:36 – The switch statement &lt;/li&gt;              &lt;li&gt;28:18 – Property access methods &lt;/li&gt;              &lt;li&gt;29:23 – Minimize DOM interaction &lt;/li&gt;              &lt;li&gt;34:23 – Use querySelectorAll for groups &lt;/li&gt;           &lt;/ul&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top"&gt;37:06&lt;/td&gt;          &lt;td valign="top"&gt;HTTP performance            &lt;ul&gt;             &lt;li&gt;37:39 - HTTP compression &lt;/li&gt;              &lt;li&gt;38:44 - Scaled images &lt;/li&gt;              &lt;li&gt;39:45 - File linking &lt;/li&gt;              &lt;li&gt;41:18 - Many images &lt;/li&gt;              &lt;li&gt;42:49 - Repeat visits &lt;/li&gt;              &lt;li&gt;44:06 - Script blocking &lt;/li&gt;              &lt;li&gt;47:55 - Tools &lt;/li&gt;           &lt;/ul&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td&gt;49:07&lt;/td&gt;          &lt;td&gt;Summary&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td&gt;50:30&lt;/td&gt;          &lt;td&gt;Q &amp;amp; A&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/center&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9559937" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Patch Released To Fix Sampling On Intel Core i7 Processors</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2009/02/24/patch-released-to-fix-sampling-on-intel-core-i7-processors.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2009/02/24/patch-released-to-fix-sampling-on-intel-core-i7-processors.aspx</id><published>2009-02-25T09:32:02Z</published><updated>2009-02-25T09:32:02Z</updated><content type="html">&lt;p&gt;A hotfix has been issued for those of you trying to do sample profiling on Intel’s Nehalem-based processors, the most recently released being the Intel Core i7 family.&amp;#160; Previously, trying to do so would result in a blue screen of death (i.e. Windows crash, machine lockup and reboot).&amp;#160; Not very useful.&amp;#160; With this patch, sampling should work as usual.&lt;/p&gt;  &lt;p&gt;If you’re running Visual Studio &lt;strong&gt;2008&lt;/strong&gt; SP1…&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/KB958842"&gt;Download the hotfix&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;958842"&gt;Read about the issue&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you’re running Visual Studio &lt;strong&gt;2005&lt;/strong&gt; SP1…&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/KB958840"&gt;Download the hotfix&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;958840"&gt;Read about the issue&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9443644" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>See The Profiler At PDC2008</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/10/27/see-the-profiler-at-pdc2008.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/10/27/see-the-profiler-at-pdc2008.aspx</id><published>2008-10-27T10:39:35Z</published><updated>2008-10-27T10:39:35Z</updated><content type="html">&lt;p&gt;Steve Carroll, development lead for the Visual Studio Profiler, will be at &lt;a href="http://microsoftpdc.com"&gt;PDC2008&lt;/a&gt; next week giving a presentation on the profiler:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;What: &lt;a href="http://channel9.msdn.com/pdc2008/TL24/"&gt;TL24: Improving .NET Application Performance and Scalability&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;When: Wednesday, October 29th, 1:15pm - 2:30pm &lt;/li&gt;    &lt;li&gt;Where: Room 153 &lt;/li&gt;    &lt;li&gt;Abstract: “Performance must be considered in each step of the development lifecycle. See how to integrate performance in design, development, testing, tuning, and production. Work with tools and technologies like: static analysis, managed memory profiling, data population, load testing, and performance reports. Learn best practices to avoid the performance pitfalls of poor CPU utilization, memory allocation bugs, and improper data sizing.” &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;If you’re going to be there, it’d be worth checking out some of the new features we’ve been working on as well as seeing how the profiler and load testing tools in Visual Studio Team System can help you improve your software.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9017687" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Visual Studio Profiler: Found A Bug? Have A Suggestion?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/09/05/visual-studio-profiler-found-a-bug-have-a-suggestion.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/09/05/visual-studio-profiler-found-a-bug-have-a-suggestion.aspx</id><published>2008-09-05T23:46:55Z</published><updated>2008-09-05T23:46:55Z</updated><content type="html">&lt;p&gt;The profiler is not flawless.&amp;#160; We work hard every day to improve it, however, and we’re always listening to and considering your feedback.&amp;#160; The profiler exists to help you, so if you feel it has shortcomings or if it fails to fully address your scenario, please let us know.&amp;#160; The more we hear from you, the more we know what’s important, what’s lacking, and what we should tweak.&amp;#160; Your feedback informs our daily decisions and sets the tone for future development.&lt;/p&gt;  &lt;p&gt;&lt;img title="connect" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 0px 5px; border-right-width: 0px" height="58" alt="connect" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VisualStudioProfilerFoundABugHaveASugges_1886/connect_a3e828dc-1871-4acb-87bc-4cbf9a53834f.png" width="140" align="right" border="0" /&gt;Luckily, using &lt;a href="http://connect.microsoft.com"&gt;Microsoft Connect&lt;/a&gt;, you can easily file a bug or give us suggestions for improvement.&amp;#160; After you’ve signed into Connect (Live ID required), you can go through the &lt;a href="https://connect.microsoft.com/VisualStudio"&gt;Visual Studio Feedback Center&lt;/a&gt; to &lt;a href="http://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=1160&amp;amp;FeedbackType=1"&gt;submit a bug&lt;/a&gt; or a &lt;a href="http://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=1167&amp;amp;FeedbackType=2"&gt;suggestion&lt;/a&gt;.&amp;#160; The higher quality bug or suggestion you file, the more likely we’ll be able to help you.&amp;#160; There’s a lot to be said about how to file an actionable bug, but please try to include the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;If applicable, the smallest project possible with which you can reproduce the issue &lt;/li&gt;    &lt;li&gt;A concise but complete set of steps to reproduce the issue &lt;/li&gt;    &lt;li&gt;If you’re profiling from the command-line, include the commands verbatim &lt;/li&gt;    &lt;li&gt;Is your OS 32- or 64-bit?&amp;#160; Is your target application 32- or 64-bit? &lt;/li&gt;    &lt;li&gt;What anti-virus/-spyware/-malware applications do you have installed? &lt;/li&gt;    &lt;li&gt;If it’s an instrumentation issue, include the binary (.exe, .dll) that you’re trying to instrument along with the matching symbols (.pdb) for that binary &lt;/li&gt;    &lt;li&gt;Include as much CPU information as possible including the number of sockets and cores as well as &lt;a href="http://www.cpuid.com/cpuz.php"&gt;details for each CPU&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Do you have any custom build steps, build scripts, pre-/post-build events, or custom output locations? &lt;/li&gt;    &lt;li&gt;Do you have any special deployment for your binaries?&amp;#160; GAC?&amp;#160; NGEN? &lt;/li&gt;    &lt;li&gt;What Visual Studio edition are you using?&amp;#160; If any, what other Visual Studio editions do you have installed? &lt;/li&gt;    &lt;li&gt;What language is your application written in?&amp;#160; C#?&amp;#160; C++?&amp;#160; Managed C++?&amp;#160; Any assembly? &lt;/li&gt;    &lt;li&gt;Include any error strings, error codes, or screenshots of errors &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Alternatively, if Connect feels too heavyweight or impersonal, you can &lt;a href="contact.aspx"&gt;contact us directly&lt;/a&gt; or post a question or suggestion in the &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=18&amp;amp;SiteID=1"&gt;profiler forums&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8926909" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>VS2008 SP1 Website Profiling Bug And Workaround</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/08/22/vs2008-sp1-website-profiling-bug-and-workaround.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/08/22/vs2008-sp1-website-profiling-bug-and-workaround.aspx</id><published>2008-08-23T01:38:38Z</published><updated>2008-08-23T01:38:38Z</updated><content type="html">&lt;p&gt;&lt;img title="out-of-range" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 10px 15px; border-right-width: 0px" height="173" alt="out-of-range" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VS2008SP1WebsiteProfilingBugAndWorkaroun_1A99/out-of-range_5.png" width="361" align="right" border="0" /&gt; Visual Studio 2008 Service Pack 1, while fixing many profiling bugs, has also unfortunately introduced an issue with website profiling.&amp;#160; If you have a website project created with a pre-SP1 version of Visual Studio and then try to profile it using instrumentation with VS2008 SP1, you might run into a rather vague error: “Value does not fall within the expected range.”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VS2008SP1WebsiteProfilingBugAndWorkaroun_1A99/out-of-range_2.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Thankfully, there is a simple workaround: open the Configuration Manager from the Build menu, and for each of your website projects listed there, change its Platform to “Any CPU”.&amp;#160; Be sure to make these changes for each configuration type defined for your solution (e.g. Debug, Release).&amp;#160; You should now be able to successfully profile your website using instrumentation.&lt;/p&gt;  &lt;p&gt;&lt;img title="build-menu" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="198" alt="build-menu" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VS2008SP1WebsiteProfilingBugAndWorkaroun_1A99/build-menu_02e3fe94-de7f-47ba-930c-a8e25ed73647.png" width="225" align="left" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title="configuration-manager" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="197" alt="configuration-manager" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/VS2008SP1WebsiteProfilingBugAndWorkaroun_1A99/configuration-manager_98ceef8c-4ad4-42fd-ae3d-859bd2a5fbfe.png" width="409" border="0" /&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8888988" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Visual Studio 2008 Service Pack 1 Released To The World!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/08/11/visual-studio-2008-service-pack-1-released-to-the-world.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/08/11/visual-studio-2008-service-pack-1-released-to-the-world.aspx</id><published>2008-08-12T08:51:51Z</published><updated>2008-08-12T08:51:51Z</updated><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;After months of development and some grueling bug fixes, we released the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=122094"&gt;VS2008 SP1 patch&lt;/a&gt; to the web this morning.&amp;#160; You can check out more details in the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=119522"&gt;readme&lt;/a&gt;.&amp;#160; For the profiler, we fixed a number of bugs including:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Adding support for instrumenting 64-bit managed C++ applications &lt;/li&gt;    &lt;li&gt;Improved instrumentation experience with precompiled websites &lt;/li&gt;    &lt;li&gt;Shipping the 64-bit &lt;a href="http://msdn.microsoft.com/en-us/library/aa985641.aspx"&gt;performance SDK&lt;/a&gt; (VSPerf.h, VSPerf.lib) &lt;/li&gt;    &lt;li&gt;Ability to load a previously saved filter on non-English VS installations &lt;/li&gt;    &lt;li&gt;Numerous fixes around comparing profiling reports &lt;/li&gt;    &lt;li&gt;Numerous fixes around function name (symbol) resolution &lt;/li&gt;    &lt;li&gt;Numerous IDE fixes &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fd02c7d6-5306-41f2-a1be-b7dcb74c9c0b&amp;amp;DisplayLang=en"&gt;standalone profiler&lt;/a&gt; has also been updated to include the profiler’s SP1 fixes.&amp;#160; If you do profiling on production machines or other environments where minimal footprint is a virtue, you’ll want to use this updated, full installer.&lt;/p&gt;  &lt;p&gt;As always, if you have questions or feedback, feel free to &lt;a href="contact.aspx"&gt;contact us&lt;/a&gt; or post a message in &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=18&amp;amp;SiteID=1"&gt;our forums&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8849992" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Walkthrough: Profiling With Automated Tests</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/08/06/walkthrough-profiling-with-automated-tests.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/08/06/walkthrough-profiling-with-automated-tests.aspx</id><published>2008-08-07T09:35:00Z</published><updated>2008-08-07T09:35:00Z</updated><content type="html">&lt;p&gt;When doing performance investigations, we recommend having some well-defined scenario in mind in order to increase the reproducibility of your issue and increase the consistency of profiling data collected.&amp;#160; This approach is similar in spirit to creating the smallest self-contained repro possible when debugging.&amp;#160; When diagnosing any complex system, limiting the variables involved is a key step to discovering a solution.&lt;/p&gt;  &lt;p&gt;Automated testing can often lead to naturally self-contained scenarios.&amp;#160; Integration tests ensure the correctness of a subsystem as its separate components work together.&amp;#160; If you test large portions of your application in this manner frequently enough, it is possible to catch performance issues and regressions before they become too serious.&amp;#160; With the profiler and test integration added in VS2008, once you notice a regression, you can create a performance session directly from the slow test via its context menu:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/test-results_10.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="test-results" border="0" alt="test-results" align="left" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/test-results_thumb_4.png" width="283" height="173" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/test-results-context-menu_16.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="test-results-context-menu" border="0" alt="test-results-context-menu" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/test-results-context-menu_thumb_7.png" width="285" height="173" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This will lead you to the Performance Wizard where you must &lt;a href="http://blogs.msdn.com/ejarvi/archive/2005/04/07/406350.aspx"&gt;decide between instrumentation and sampling&lt;/a&gt;.&amp;#160; Which method you should use depends upon the type of application you’re profiling and the kinds of questions you’re trying to answer.&amp;#160; Once you’ve completed the wizard, you’ll get a shiny new performance session ready to be launched.&amp;#160; You’ll see below that, in this case, our primary project and profiling target, Intergalactic.exe, is marked for instrumentation while the unit test is what we’ll be launching.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/performance-wizard_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="performance-wizard" border="0" alt="performance-wizard" align="left" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/performance-wizard_thumb.png" width="267" height="159" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/performance-explorer_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="performance-explorer" border="0" alt="performance-explorer" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/performance-explorer_thumb.png" width="202" height="159" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After launching the profiler, the test will execute as normal, exercising your code under the profiler.&amp;#160; The benefit of this approach is that reproducibility is maximized since the scenario is defined in code.&amp;#160; After the test completes, you’ll get a performance report to assist you with further investigations.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/summary_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="summary" border="0" alt="summary" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/WalkthroughProfilingAUnitTest_12B5C/summary_thumb_3.png" width="760" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Performance sessions can be created from unit tests, web tests, database tests, and load tests containing web tests.&amp;#160; Load test and web test profiling will only work if you’re running against a web site or web service hosted locally in IIS or Cassini.&amp;#160; The reason for this limitation is that the profiler must run on the same physical machine as the target process in which you’re interested.&amp;#160; If you must profile a web site or web service running remotely, try using the &lt;a href="http://msdn.microsoft.com/en-us/library/ms182401.aspx"&gt;command-line tools&lt;/a&gt; included in the &lt;a href="http://msdn.microsoft.com/en-us/library/bb385771.aspx"&gt;standalone profiler&lt;/a&gt;, referring to &lt;a href="http://blogs.msdn.com/graycode/articles/AspNetOffRoadProfilingArticle.aspx"&gt;this blog article&lt;/a&gt; for guidance.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8841458" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Sample Profiling And Stdin</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/07/29/sample-profiling-and-stdin.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/07/29/sample-profiling-and-stdin.aspx</id><published>2008-07-30T00:08:00Z</published><updated>2008-07-30T00:08:00Z</updated><content type="html">&lt;P&gt;Some command-line applications can read from stdin for use as program input.&amp;nbsp; The canonical example of this is sort.exe which sorts the list of strings given to it and prints it back out to the console:&lt;/P&gt;
&lt;P class=code&gt;C:\Temp&amp;gt; type letters.txt &lt;BR&gt;m &lt;BR&gt;z &lt;BR&gt;a&lt;/P&gt;
&lt;P class=code&gt;C:\Temp&amp;gt; sort &amp;lt; letters.txt &lt;BR&gt;a &lt;BR&gt;m &lt;BR&gt;z&lt;/P&gt;
&lt;P&gt;Sample profiling an application that reads from stdin is a bit trickier than typical sample profiling.&amp;nbsp; It is not easily possible from the VS IDE, so you have to drop down to the &lt;A href="http://msdn.microsoft.com/en-us/library/ms182401.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms182401.aspx"&gt;profiler’s command-line tools&lt;/A&gt;.&amp;nbsp; The command-line tools support passing arguments to the target program via &lt;SPAN class=code&gt;vsperfcmd /args&lt;/SPAN&gt;, but a stdin file parameter is &lt;EM&gt;not&lt;/EM&gt; considered to be a program argument.&amp;nbsp; In other words, the following does not work as you might expect:&lt;/P&gt;
&lt;P class=code&gt;vsperfcmd /start:sample /output:profile.vsp /launch:sort.exe /args:”&amp;lt; letters.txt”&lt;/P&gt;
&lt;P&gt;This will behave as if you launched &lt;SPAN class=code&gt;sort.exe “&amp;lt; letters.txt”&lt;/SPAN&gt;.&amp;nbsp; Unfortunately, this is not the intent here.&amp;nbsp; In order to get around this, we can use cmd.exe’s built-in &lt;SPAN class=code&gt;start&lt;/SPAN&gt; utility and its background feature.&amp;nbsp; The &lt;SPAN class=code&gt;start&lt;/SPAN&gt; utility is the Swiss Army knife for launching programs.&amp;nbsp; Its background feature lets you launch a command in the background &lt;EM&gt;without creating a new cmd window&lt;/EM&gt; while still &lt;EM&gt;passing through any stdin parameters&lt;/EM&gt;.&amp;nbsp; Knowing this, and assuming we’re profiling a native application, we can create a simple batch file to get the job done: 
&lt;P class=code&gt;start /b sort.exe &amp;lt; letters.txt &lt;BR&gt;vsperfcmd /start:sample /attach:sort.exe /output:profile.vsp &lt;BR&gt;vsperfcmd /shutdown&lt;/P&gt;
&lt;P&gt;Because we are attaching after launching the application, we will probably miss a few samples at the beginning.&amp;nbsp; Having these commands in a batch file, however, ensures that we miss as few samples as possible.&amp;nbsp; For any real workload, losing a few samples should not be an issue.&lt;/P&gt;
&lt;P&gt;Interestingly, instrumentation (trace) profiling does not suffer from this issue at all because of the way in which instrumented binaries are launched.&amp;nbsp; To achieve the above with instrumentation, you can simply do the following:&lt;/P&gt;
&lt;P class=code&gt;vsinstr sort.exe &lt;BR&gt;vsperfcmd /start:trace /output:profile.vsp &lt;BR&gt;sort.exe &amp;lt; letters.txt &lt;BR&gt;vsperfcmd /shutdown&lt;/P&gt;
&lt;P&gt;If all else fails, or if your scenario is more complicated than above, you can always just modify your application to use a hardcoded input path.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8789920" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>Excluding Small Functions From Instrumentation</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/07/08/excluding-small-functions-from-instrumentation.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/07/08/excluding-small-functions-from-instrumentation.aspx</id><published>2008-07-09T05:57:10Z</published><updated>2008-07-09T05:57:10Z</updated><content type="html">&lt;p&gt;In Visual Studio 2008, we added a feature to exclude small functions from instrumentation.&amp;#160; A small function is a function that has very few instructions and makes no function calls (i.e. it’s a leaf).&amp;#160; The idea behind this feature is that small functions are unlikely to be significant in the overall profile of your application, so we can skip collecting data for them altogether to avoid the overhead of otherwise doing so.&amp;#160; This feature is meant to exclude property getters and setters, but it will also exclude very simple functions that are typically inlined anyway.&lt;/p&gt;  &lt;p&gt;The first benefit of this feature is reduced instrumentation probe execution overhead.&amp;#160; Typically, small property getters and setters incur the time cost of executing two probes: the enter and exit probes.&amp;#160; The execution time of these probes dwarfs the execution time of the getter or setter itself.&amp;#160; To top it off, this cost is paid on every single property access which can be frequent.&amp;#160; By not instrumenting these property getters and setters, we can reduce execution overhead.&lt;/p&gt;  &lt;p&gt;The second benefit is reduced profile data file (.vsp) size.&amp;#160; Fewer probes means less data collected.&amp;#160; If you’ve done instrumentation profiling before, you probably know that the data files can grow quickly.&amp;#160; Keeping file sizes smaller facilitates sharing and faster analysis.&lt;/p&gt;  &lt;p&gt;The third benefit is reduced noise in your profile.&amp;#160; Since we don’t collect any data for these insignificant functions, they won’t even show up in your reports.&amp;#160; This is similar to, but independent of, the new &lt;a href="http://blogs.msdn.com/colinth/archive/2008/01/31/noise-reduction-in-vs2008.aspx"&gt;noise reduction&lt;/a&gt; feature in VS2008.&lt;/p&gt;  &lt;p&gt;With this feature enabled, it’s important to note that the time spent executing a small function does not just disappear.&amp;#160; Instead, the time gets attributed to the callers of the function excluded.&amp;#160; For example, if Foo calls SmallFunc, the exclusive time of SmallFunc when Foo called it is added to Foo’s exclusive time.&amp;#160; It’s as if the function was inlined at all of its call sites.&lt;/p&gt;  &lt;p&gt;Small function exclusion is enabled by default which can, on occasion, cause issues.&amp;#160; &lt;em&gt;Really&lt;/em&gt; simple projects such as a default C# console application or a default WCF service, are essentially infrastructure code in addition to (nearly) empty functions.&amp;#160; Because of this, profiling one of these default project types immediately after creation will typically yield “Error VSP1734 : File contains no data: ...” since nothing gets instrumented (they’re all small functions, after all).&lt;/p&gt;  &lt;p&gt;You can disable small function exclusion by opening an instrumentation target’s properties, selecting the Instrumentation section, and unchecking “Exclude small functions from instrumentation”.&amp;#160; Each instrumentation target has its own value for this property.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Excludingsmallfunctionsfrominstrumentati_1330F/target-props_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="target-props" border="0" alt="target-props" align="left" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Excludingsmallfunctionsfrominstrumentati_1330F/target-props_thumb.png" width="263" height="204" /&gt;&lt;/a&gt; &lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Excludingsmallfunctionsfrominstrumentati_1330F/exclude-small-funcs_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="exclude-small-funcs" border="0" alt="exclude-small-funcs" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Excludingsmallfunctionsfrominstrumentati_1330F/exclude-small-funcs_thumb.png" width="303" height="204" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;If you’re instrumenting your binaries on the command-line using &lt;a href="http://msdn.microsoft.com/en-us/library/ms182402.aspx"&gt;vsinstr.exe&lt;/a&gt;, you can specify /excludesmallfuncs to exclude small functions from instrumentation.&amp;#160; The default command-line behavior is to instrument everything.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8711004" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>What code path is allocating the most bytes for a type?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2008/06/14/where-are-the-most-bytes-for-a-type-being-allocated.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2008/06/14/where-are-the-most-bytes-for-a-type-being-allocated.aspx</id><published>2008-06-15T02:26:10Z</published><updated>2008-06-15T02:26:10Z</updated><content type="html">&lt;p&gt;In Visual Studio 2008, we added the ability to &lt;a href="http://blogs.msdn.com/ianhu/archive/2007/09/14/pinpoint-a-performance-issue-using-hotpath-in-visual-studio-2008.aspx"&gt;quickly determine the most expensive call stack in your application&lt;/a&gt;.&amp;#160; In profiler parlance, the “most expensive call stack” is known as the “hot path”.&amp;#160; What do we mean by “expensive”?&amp;#160; “Expensive” is whatever measure you want it to be: number of samples in a function, time spent in a function, or even number of bytes or allocations in a function.&lt;/p&gt;  &lt;p&gt;If you &lt;a href="http://blogs.msdn.com/ianhu/archive/2005/03/31/404173.aspx"&gt;profile the managed memory usage of your application&lt;/a&gt; (also available in VS2008), you will get a new view in your profiling report called the Allocation View:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Wherearethemostbytesforatypebeingallocat_E67E/allocation-view_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="allocation-view" border="0" alt="allocation-view" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Wherearethemostbytesforatypebeingallocat_E67E/allocation-view_thumb_3.png" width="548" height="314" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;For each managed type allocated in your application, this view will show you the call stack where each allocation took place as well as the number of bytes and instances allocated in each function.&lt;/p&gt;  &lt;p&gt;You can explore these call trees as you do normally, including using hot path to find the expensive allocation paths through your code for a specific type.&amp;#160; This is accessible through either the toolbar or the context menu by right-clicking on the function from where you want to start hot path:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Wherearethemostbytesforatypebeingallocat_E67E/allocation-hot-path-menu_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="allocation-hot-path-menu" border="0" alt="allocation-hot-path-menu" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Wherearethemostbytesforatypebeingallocat_E67E/allocation-hot-path-menu_thumb.png" width="548" height="344" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In this example, we know we’re allocating about 741KB of memory for System.Drawing.Graphics objects.&amp;#160; Using hot path, we can quickly determine that the majority (67%)&amp;#160; of the bytes are being allocated in System.Drawing.Graphics.FromHwndInternal.&amp;#160; Because we do not control this code, we can look up the stack until we see code that we can change: MainForm.SetCell.&amp;#160; This would be a great place to begin investigation.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Wherearethemostbytesforatypebeingallocat_E67E/allocation-hot-path_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="allocation-hot-path" border="0" alt="allocation-hot-path" src="http://blogs.msdn.com/blogfiles/chrissc/WindowsLiveWriter/Wherearethemostbytesforatypebeingallocat_E67E/allocation-hot-path_thumb_2.png" width="548" height="314" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It’s important to note that the allocation hot path &lt;em&gt;is not&lt;/em&gt; the single function allocating the most bytes in your application (you can use the Function View for that).&amp;#160; Instead, it is the specific path through your code that is allocating the most bytes for a type.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8598664" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author></entry><entry><title>TechEd 2007 Visual Studio Profiler Talk Available</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2007/08/13/teched-2007-vsts-profiler-talk-available.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2007/08/13/teched-2007-vsts-profiler-talk-available.aspx</id><published>2007-08-13T10:21:00Z</published><updated>2007-08-13T10:21:00Z</updated><content type="html">&lt;p&gt;The TechEd 2007 VSTS Profiler presentation is available online with &lt;a href="http://download.microsoft.com/download/1/b/0/1b0d95a3-40be-41ce-a40d-512a5f869938/dev313_carroll.pptx" mce_href="http://download.microsoft.com/download/1/b/0/1b0d95a3-40be-41ce-a40d-512a5f869938/dev313_carroll.pptx"&gt;slides&lt;/a&gt;
and a &lt;a href="http://download.microsoft.com/download/1/b/0/1b0d95a3-40be-41ce-a40d-512a5f869938/dev313.wmv" mce_href="http://download.microsoft.com/download/1/b/0/1b0d95a3-40be-41ce-a40d-512a5f869938/dev313.wmv"&gt;video&lt;/a&gt;. Use the key below to jump to the topics that interest you.
&lt;/p&gt;
&lt;center&gt;
&lt;table class="key" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;

&lt;td&gt;02:36&lt;/td&gt;
&lt;td&gt;Agenda&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;03:49&lt;/td&gt;
&lt;td&gt;Performance lifecycle overview&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;07:11&lt;/td&gt;
&lt;td&gt;&lt;i&gt;Demo&lt;/i&gt; - Profiler run-through with a sample app&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13:56&lt;/td&gt;
&lt;td&gt;Technical deep dive
&lt;ul&gt;
&lt;li&gt;14:57 - &lt;i&gt;Demo&lt;/i&gt; - Finding the critical resource &lt;/li&gt;&lt;li&gt;17:00 - Types of profiling &lt;/li&gt;&lt;li&gt;18:02 - Sampling &lt;/li&gt;&lt;li&gt;19:49 - Instrumentation &lt;/li&gt;&lt;li&gt;22:18 - Choosing a profiling method &lt;/li&gt;&lt;li&gt;23:24 - Memory profiling &lt;/li&gt;&lt;/ul&gt;
&lt;/td&gt;

&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;29:02&lt;/td&gt;
&lt;td&gt;Web and load testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30:34&lt;/td&gt;
&lt;td&gt;&lt;i&gt;Demo&lt;/i&gt; - Profiling web tests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;35:16&lt;/td&gt;

&lt;td&gt;&lt;i&gt;Demo&lt;/i&gt; - Finding performance regressions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;36:55&lt;/td&gt;
&lt;td&gt;&lt;i&gt;Demo&lt;/i&gt; - Narrowing in on performance problems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;44:34&lt;/td&gt;
&lt;td&gt;New profiling features in Visual Studio 2008&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;45:12&lt;/td&gt;
&lt;td&gt;Tips and tricks
&lt;ul&gt;
&lt;li&gt;45:12 - Using a symbol server &lt;/li&gt;&lt;li&gt;46:24 - Collecting data on lab machines &lt;/li&gt;&lt;li&gt;47:33 - Symbol packing &lt;/li&gt;&lt;li&gt;48:20 - Fine grain control with the profiler API &lt;/li&gt;&lt;li&gt;50:03 - Profiling managed services &lt;/li&gt;&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;51:44&lt;/td&gt;

&lt;td&gt;Where to learn more&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/center&gt;

&lt;p&gt;If you're new to the profiler or have never seen it in action, I strongly
suggest checking out the run-through at 07:11.&lt;/p&gt;

&lt;p&gt;Additional TechEd 2007 VSTS presentations are also &lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/bb676080.aspx" mce_href="http://msdn2.microsoft.com/en-us/teamsystem/bb676080.aspx" target="_blank"&gt;
available&lt;/a&gt;. &lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4364698" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author><category term="orcas" scheme="http://blogs.msdn.com/chrissc/archive/tags/orcas/default.aspx" /><category term="profiler" scheme="http://blogs.msdn.com/chrissc/archive/tags/profiler/default.aspx" /><category term="teched" scheme="http://blogs.msdn.com/chrissc/archive/tags/teched/default.aspx" /><category term="visual studio" scheme="http://blogs.msdn.com/chrissc/archive/tags/visual+studio/default.aspx" /></entry><entry><title>It's Aliiiiive: Visual Studio 2008 Beta 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2007/07/27/visual-studio-2008-beta-2.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2007/07/27/visual-studio-2008-beta-2.aspx</id><published>2007-07-27T11:13:00Z</published><updated>2007-07-27T11:13:00Z</updated><content type="html">&lt;p&gt;I'm a little late to the party, but &lt;a href="http://go.microsoft.com/?linkid=7175498" mce_href="http://go.microsoft.com/?linkid=7175498"&gt;Visual Studio 2008 Beta 2&lt;/a&gt;
is alive and kicking with its public release, accompanied by a GoLive license!&lt;/p&gt;

&lt;p&gt;We'd love to hear your feedback on the
profiler as we've done a lot of polishing since Beta 1.  Unfortunately, we do not
support profiling on VPC, so I recommend downloading and installing the &lt;a href="http://go.microsoft.com/?linkid=7171917" mce_href="http://go.microsoft.com/?linkid=7171917"&gt;Visual Studio
Team System 2008 - Team Suite Beta 2&lt;/a&gt; image.  If you'd like to see VPC profiling
support, please &lt;a href="http://blogs.msdn.com/chrissc/contact.aspx" mce_href="http://blogs.msdn.com/chrissc/contact.aspx"&gt;let us
know&lt;/a&gt;.

&lt;/p&gt;&lt;p&gt;Of course, in Visual Studio 2008, there's much, &lt;i&gt;much&lt;/i&gt; more than just improvements
to the profiler.  If you've got a few minutes, it's worth seeing what's new, in
either &lt;a href="http://channel9.msdn.com/Showpost.aspx?postid=329443" mce_href="http://channel9.msdn.com/Showpost.aspx?postid=329443"&gt;video&lt;/a&gt;
or &lt;a href="http://go.microsoft.com/?linkid=6625887" mce_href="http://go.microsoft.com/?linkid=6625887"&gt;white paper&lt;/a&gt; form.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4076946" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author><category term="orcas" scheme="http://blogs.msdn.com/chrissc/archive/tags/orcas/default.aspx" /><category term="profiler" scheme="http://blogs.msdn.com/chrissc/archive/tags/profiler/default.aspx" /><category term="visual studio" scheme="http://blogs.msdn.com/chrissc/archive/tags/visual+studio/default.aspx" /></entry><entry><title>Visual Studio Profiler Talk at TechEd 2007</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/chrissc/archive/2007/06/06/vsts-profiler-talk-at-teched-2007.aspx" /><id>http://blogs.msdn.com/chrissc/archive/2007/06/06/vsts-profiler-talk-at-teched-2007.aspx</id><published>2007-06-06T12:10:00Z</published><updated>2007-06-06T12:10:00Z</updated><content type="html">&lt;p&gt;
Steve Carroll, the profiler dev lead, and Marc Popkin-Paine, the
profiler QA lead, will be presenting at &lt;a href="http://www.microsoft.com/events/teched2007/" mce_href="http://www.microsoft.com/events/teched2007/"&gt;TechEd 2007&lt;/a&gt;
tomorrow, June 7th:
&lt;/p&gt;

&lt;table style="border-collapse: collapse;" border="1" cellpadding="3" cellspacing="0"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;DEV313 - Improving Code Performance with Microsoft Visual Studio Team System&amp;nbsp;&amp;nbsp;[N210 E]&lt;/td&gt;
&lt;td&gt;June 07&lt;/td&gt;
&lt;td&gt;9:45 AM&lt;/td&gt;
&lt;td&gt;11:00 AM&lt;/td&gt;

&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;
They'll be explaining and demonstrating how developers can use the VSTS profiler to gain
insight into the performance of their applications. You might also catch some of the profiler's shiny new
features for &lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/aa700831.aspx" mce_href="http://msdn2.microsoft.com/en-us/teamsystem/aa700831.aspx"&gt;Orcas&lt;/a&gt;, like
&lt;a href="http://blogs.msdn.com/ianhu/archive/2007/04/03/comparing-performance-reports-with-the-visual-studio-team-system-profiler.aspx" mce_href="http://blogs.msdn.com/ianhu/archive/2007/04/03/comparing-performance-reports-with-the-visual-studio-team-system-profiler.aspx"&gt;performance
report comparisons&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
If you're interested in analyzing and improving the performance of your
application, which you probably &lt;a 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;should
be&lt;/a&gt;, then I encourage you to attend, ask questions, and give suggestions.  If
you can't make it to sunny Orlando, then head over to &lt;a href="http://www.virtualteched.com/" mce_href="http://www.virtualteched.com/"&gt;Virtual TechEd&lt;/a&gt; for coverage.

&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3113410" width="1" height="1"&gt;</content><author><name>chrissc</name><uri>http://blogs.msdn.com/members/chrissc.aspx</uri></author><category term="orcas" scheme="http://blogs.msdn.com/chrissc/archive/tags/orcas/default.aspx" /><category term="profiler" scheme="http://blogs.msdn.com/chrissc/archive/tags/profiler/default.aspx" /><category term="teched" scheme="http://blogs.msdn.com/chrissc/archive/tags/teched/default.aspx" /><category term="visual studio" scheme="http://blogs.msdn.com/chrissc/archive/tags/visual+studio/default.aspx" /></entry></feed>