ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools

214
-1

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
214
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools

  1. 1. itcampro@ itcamp13# Premium conference on Microsoft technologiesDemystifying Visual Studio2012 Performance ToolsMartin Kulov, kulovvnet
  2. 2. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileHuge thanks to our sponsors!
  3. 3. itcampro@ itcamp13# Premium conference on Microsoft technologiesYou cannot manage,What you do not measure
  4. 4. itcampro@ itcamp13# Premium conference on Microsoft technologiesYou cannot Improve,What you do not measure
  5. 5. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileOperating SystemTrace AnalysisHDD RAM CPU LANWin32 APICLR WinRTCPUCountersCOMOur code
  6. 6. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileCPU Counters• Hardware events – portable and platform– Instructions Retired– Non Halted Cycles– ITLB Misses– Branches Retired– Mis-predicted Branches– L2 Cache Read Misses– L2 Cache Read References
  7. 7. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileOperating SystemTrace AnalysisHDD RAM CPU LANWin32 APICLR WinRTWindowsPerfCountersCPUCountersCOMOur code
  8. 8. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &Mobile• They are …counters• Min interval – 1sec• Apps and kernel send Increment signals• Accessed by Windows APIWindows Performance Counters
  9. 9. itcampro@ itcamp13# Premium conference on Microsoft technologiesPerf Counters Demo
  10. 10. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileOperating SystemTrace AnalysisHDD RAM CPU LANWin32 APICLR WinRTWindowsPerfCountersCPUCountersEventTracingforWindowsCOMOur code
  11. 11. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileEvent Tracing for Windows• General purpose, high speed tracing• Buffering and logging in kernel• Faster than printf– 20,000 events per second while only using 5% CPU load on a P3 500MHz!• Provider, Consumer, Controller model• Over 700 providers in Win7, ~900 in Win8!• Aggregates all sources• Stack walking (on kernel events)
  12. 12. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileETW Kernel Providers• Hardware Configuration Events• Disk-level I/O• File-level I/O• Image Layouts• Page Faults• Network I/O• Registry I/O• Process and Thread info
  13. 13. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileETW Application Providers• Windows Firewall• WLAN, LAN• USB, Bluetooth• IIS, ASP.NET, CLR, HTTP.SYS• Security• … many more
  14. 14. itcampro@ itcamp13# Premium conference on Microsoft technologiesETW Demo
  15. 15. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileSide note: Symbols• _NT_SYMBOL_PATH=SRV*c:mss*http://msdl.microsoft.com/download/symbols• Call stack information• Private managed code fields• Link to source code repository
  16. 16. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileConcurrency Visualizer• Utilization• Threads• Cores• Stack Walking
  17. 17. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileOperating SystemTrace AnalysisHDD RAM CPU LANWin32 APICLR WinRTWindowsPerfCountersCPUCountersEventTracingforWindowsCOMOur codeProfiler
  18. 18. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileProfiler• Instrumentation• Sampling• Concurrency• Stack Walking
  19. 19. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileProfiler setup• There can be only one• Uses environment variables– COR_ENABLE_PROFILING– COR_PROFILER– COR_XXX…• Profiler API
  20. 20. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileInstrumentation• Profiler based• Requires full code recompilation• Best during development phase• Complete execution path
  21. 21. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileSampling• Profiler based• Data collection on sample intervals• Suitable for long runs• Call Stack
  22. 22. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileConcurrency• Show resource contention• Based on Detours• Microsoft Research project now sold for $10k• http://research.microsoft.com/en-us/projects/detours/• Stack Walking
  23. 23. itcampro@ itcamp13# Premium conference on Microsoft technologiesDevelopment &MobileProfiling extras• GC, Allocation• Tier Interaction• JavaScript• Production use• Licensing
  24. 24. itcampro@ itcamp13# Premium conference on Microsoft technologiesProfiler Demo
  25. 25. itcampro@ itcamp13# Premium conference on Microsoft technologiesQ & Ablog.kulov.net@kulov

×