15
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013 #devconnections

Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

Embed Size (px)

DESCRIPTION

Talk from DevConnections 2014 on performance and debugging with Visual Studio.

Citation preview

Page 1: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

Performance and Debugging with the

Diagnostics Hub in Visual Studio 2013

#devconnections

Page 2: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

SESSION TITLE

#devconnections

Sasha Goldshtein

CTO, Sela GroupMicrosoft C# MVP, Azure MRS@goldshtn blog.sashag.net

#devconnections

Page 3: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Visual Studio Diagnostic Tools

#devconnections

Page 4: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Unified Diagnostics Hub

• Pick a target and then choose the tools that work best

#devconnections

Page 5: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Sampling Profiler• Get quick CPU

performance information

• Measures CPU time, not wall-clock!

• Supports attach/detach

#devconnections

Page 6: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Instrumentation Profiler• More accurate time

information (wall-clock)

• Much more expensive because of instrumentation

• No attach/detach

void DoSomething(){ ENTER_METHOD(123); for (...) ... EXTERNAL_CALL(123, 456); HelperMethod(); EXTERNAL_RET(123, 456); for (...) ... EXIT_METHOD(123);}

#devconnections

Page 7: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

DEMOSampling vs. Instrumentation

#devconnections

Page 8: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Concurrency Visualizer• Visualize the behavior

of your threads and your CPU utilization

• Identify blocking behaviors

• Identify concurrency anti-patterns

#devconnections

Page 9: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

UI Responsiveness Tool• For Windows Store

XAML/JavaScript apps

• Understands why your UI isn’t crisp and responsive

• Combine with CPU usage and energy utilization tools

#devconnections

Page 10: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

DEMOConcurrency and UI Responsiveness

#devconnections

Page 11: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Memory Usage Analysis• Run a Windows

Store/Phone app and inspect its memory allocations– Large, inefficient

allocations can slow down C# and JS apps

– In C++ apps, this is the only way to debug memory leaks

#devconnections

Page 12: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Memory Dump Analysis• Open .NET dump

files* and inspect live objects, reference chains, etc.

* Also PerfView/Azure heap snapshots

#devconnections

Page 13: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

DEMOMemory Analysis

#devconnections

Page 14: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO

Summary

• There’s something for everyone in the Visual Studio diagnostic hub

• Performance, memory, dump analysis, UI responsiveness, and much more

#devconnections

Page 15: Performance and Debugging with the Diagnostics Hub in Visual Studio 2013

SESSION TITLE

#devconnections

Rate This Session Now!Rate with Mobile App:1. Select the session from the

Agenda or Speakers menus

2. Select the Actions tab

3. Click Rate Session

Rate Using Our Website:1. Register at www.devconnections.com/logintoratesession

2. Go to www.devconnections.com/ratesession

3. Select this session from the list and rate it

Tell Us What

You Thought

of This Session

Be Entered to

WIN

Prizes!