1 / 16

Windows 8 . NET Store Apps Debugging

Windows 8 . NET Store Apps Debugging. Mario Hewardt Senior Developer PFE. Objectives. Investigate a memory problem in a Windows 8 Store Application Learn how to quickly triage possible memory problems in .NET using PerfMon Learn how to control Windows 8 Process Lifetime Management

yaakov
Download Presentation

Windows 8 . NET Store Apps Debugging

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows 8 .NET Store Apps Debugging Mario Hewardt Senior Developer PFE

  2. Objectives • Investigate a memory problem in a Windows 8 Store Application • Learn how to quickly triage possible memory problems in .NET using PerfMon • Learn how to control Windows 8 Process Lifetime Management • Learn how to dig deeper into the managed heap to find root cause • Learn new .NET 4.5 debug switches for more efficient debugging

  3. Windows 8 and .NET Magic • No magic  • Just a new .NET version with an improved GC • BUT – PLM can throw you for a loop • Bottom line – Debugging applications under control of PLM can change your debugging experience

  4. .NET Memory Basics - SOH • Small object heap • < 85000 bytes • Compacted and beautiful • Few exceptions one common one is: Pinning

  5. .NET Memory Basics - LOH • Large Object heap • >= 85000 bytes • Not compacted • Recently released preview of .NET 4.5.1 includes the ability to compact LOH programmatically

  6. .NET Memory Basics – GC Modes • Server • Workstation • 4.0 Background (workstation) • 4.5 Background (server)

  7. The Memory Hogging Application • Application plays the XBox One ‘Reveal’ video • Complaint: Application uses excessive memory • Short video clip uses close to 1GB of memory

  8. Step 1 – Is it even a Problem?

  9. Step 2 – Windows 8 PLM • In previous versions of Windows, user controlled the lifetime of a process • In Windows 8, it itself can as well • Process Lifetime Management (PLM) component • Used as a means to conserve energy/battery

  10. PLM States Running Suspended Stopped

  11. PLM and Debugging • As a process transitions throughout the state machine, debugging can be effected • What happens if you attach when its suspended? • Key is to control the PLM policy • Rather, disable it when we debug

  12. Walkthrough

  13. Step 3 - Overview of Managed Heap

  14. Step 4 – Root cause

  15. Walkthrough • New switches to !DumpHeap command

  16. Q&A

More Related