Upload
sasha-goldshtein
View
915
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Talk from DevConnections 2014 on performance and debugging with Visual Studio.
Citation preview
Performance and Debugging with the
Diagnostics Hub in Visual Studio 2013
#devconnections
SESSION TITLE
#devconnections
Sasha Goldshtein
CTO, Sela GroupMicrosoft C# MVP, Azure MRS@goldshtn blog.sashag.net
#devconnections
PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO
Visual Studio Diagnostic Tools
#devconnections
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
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
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
PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO
DEMOSampling vs. Instrumentation
#devconnections
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
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
PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO
DEMOConcurrency and UI Responsiveness
#devconnections
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
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
PERFORMANCE AND DEBUGGING WITH THE DIAGNOSTICS HUB IN VISUAL STUDIO
DEMOMemory Analysis
#devconnections
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
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!