VS2010: Just My Code

The ‘Just My Code’ feature in the profiler has a few differences to the ‘Just My Code’ feature in the debugger so this post should provide a useful introduction. Example Program Here’s a very simple program I’ll use in this post. using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Foo();…

1

Tip: Fixing VSPerfASPNetCmd metabase errors

VSPerfASPNetCmd is a new Visual Studio 2010 tool that helps you profile ASP.Net websites from the command-line. Recently I noticed an error message which didn’t cover one common situation so I thought I’d write about it. Here’s an example: > VSPerfASPNetCmd.exe http://localhost Microsoft (R) VSPerf ASP.NET Command, Version 10.0.0.0 Copyright (C) Microsoft Corporation. All rights…

0

VS2010: Profiler Guidance (rules) Part 1

The new guidance feature in the VS2010 profiler will look familiar to people who have used the static code analysis tools in previous versions. However, instead of statically analyzing your code, the profiler runs it and analyzes the results to provide guidance to fix some common performance issues. Probably the best way to introduce this…

0

VS2010: Profiling In Progress (PIP)

With Visual Studio 2010 we want to make it clearer when you are profiling your application within the Visual Studio IDE. To accomplish this we added a new control which we call ‘Profiling In Progress’ or PIP, which we show when you launch the profiler or attach the profiler to a running application. Our goal…

2

VS2010: Investigating a sample profiling report (Function Details)

I’ve already discussed how the new profiler summary page makes it easier to discover and fix performance issues, but sometimes a little more investigation is required. This time I’m going to drill in with another new VS2010 feature called the Function Details View. I’m going to use PeopleTrax application again, which you can download from…

0

VS2010: New Profiler Summary Page

With Visual Studio 2010 we want to make it easier for customers to find and fix performance issues with their code. One of the first things we looked at was the view that shows up after profiling an application – the Summary Page. I’ll describe a few features of the new summary page using the…

0

Using the keyboard to profile an application (Alt-F2 shortcut)

In announcing Visual Studio Beta 2 profiler features, Chris mentioned that we have a new option on the Debug menu called ‘Start Performance Analysis’ which has the Alt-F2 keyboard shortcut. This makes it easier than ever to start profiling your application. The new menu item has the following behavior: You must have a Visual Studio…

0

VS2010: Attaching the Profiler to a Managed Application

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: vsperfclrenv /sampleon [Start managed application from the same command window] vsperfcmd /start:sample /output:myapp.vsp /attach:[pid] [Close application] If the environment variables were not correctly set,…

0

Tip: VS2008 – Finding and Setting Properties (Right-Click)

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.   Performance Session:   Select an existing Performance Session in the Performance Explorer to see properties in the Properties Window. If the Properties…

0

Tip: VS2008 – Understanding Performance Targets

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 PeopleTrax solution shown on the right has 4 projects, with 3 of them compiling to managed DLLs and 1 compiling to an executable. After running the Performance Wizard to…

0