Profiling From the Command Line

General Tips: /? is your friend.  Until formal docs are written, you can see all the parameters that each command-line tool accepts by calling the .exe with the /? option.  Do yourself a favor and set up the PATH environment variable.  The “Visual Studio Command Prompt” shortcut has not yet been updated in CTP to include…

16

The Visual Studio Profiler on Windows 8

Windows 8 brought a lot of great changes to Windows including a stronger security model and new capabilities for performance tools. I am excited about how the new capabilities allow us to deliver new performance tooling not previously possible, e.g. the JavaScript Memory Analyzer for Windows Store apps. However because of the stronger security model…


Profiling is great! … What does it do?

The profiler has been gone from Visual Studio for awhile.  I think… 6.0? Or maybe even 5.0 was the last incarnation.  The core idea is to provide a tool to find those parts of your application that are preventing it from meeting performance goals, and to help document where the critical time being spent in…

7

How to profile ASP.NET and Silverlight at the same time

In Visual Studio 2010 SP1 we enabled the ability to profile Silverlight applications from the Visual Studio UI.  Unfortunately there is a limitation where we cannot automatically attach to multiple processes on launch from inside Visual Studio, so you are still unable to profile ASP.NET and Silverlight at the same time without manually attaching to…


What are Exclusive and Inclusive?!

I wanted to address our most frequently asked question here. In the profiler reports we always report both an exclusive and inclusive statistic for each function.  For instance, in sampling mode, each function in the function list reports “Exclusive Samples“ and “Inclusive Samples.“  In instrumentation mode, each function in the function list reports “Exclusive Time“…

6

What is the difference between Elapsed and Application Time?!

This is the second in my series of posts on what the heck all these numbers mean in the profiler. In instrumentation mode, we give 4 varieties of statistics for each function in the reports: – Elapsed Inclusive- Elapsed Exclusive- Application Inclusive- Application Exclusive The first post in this series is here and discusses the…

6

Managing how you Profile .Net Code

There are three environment variables needed for a .Net application you wish to profile. The profiler team has provided VSPerfCLREnv.cmd to set these variables for you.  The switches for this helper file are:  for trace (instrumentation) profiling: /traceon for standard .Net profiling /tracegc to get allocation events as well for sampling: /sampleon for attaching to a .Net…

5

Excluding Small Functions From Instrumentation

In Visual Studio 2008, we added a feature to exclude small functions from instrumentation.  A small function is a function that has very few instructions and makes no function calls (i.e. it’s a leaf).  The idea behind this feature is that small functions are unlikely to be significant in the overall profile of your application,…

3

VS2010 SP1: Silverlight 4 profiling from Visual Studio UI

  If you install recently published VS2010 SP1 Beta, you can discover that VS Profiler team enriched Silverlight profiling user experience. Previously I published few posts about VS2010 usage for those purposes, either through VS Profiler command line tools or VS2010 UI. Both approaches led you to the final results or figuring out the bottlenecks…

3