Lecture 22: Xbox 360 Debugging & Monitoring Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of TechnologyAssembly InformationSetting a breakpoint Or use System.Diagnostics.Debugger.Break();Snapshot after each “continue” 5Peek at variables on the Xbox 360Remote Performance Monitor • Basic garbage collector information • Can tell if you have a GC problem • Not usually enough to diagnose the cause • Shows the number of system calls • Not much help with computational bottlenecksLaunching from the Performance Monitor“Lies, damn lies, and statistics” • See Shawn Hargreaves, “Understanding XNA Framework Performance” PowerPoint presentation for tips on interpreting numbers – Garbage collection issues – Kernal/User mode switchesPublish to PerfMonFinding PerfMonPerfMonAdding a counterPerfMoning SpacewarPerfMon PropertiesSetting scalesGC HeapProfiling on Windows • Inference to the rescue! – The XNA Framework is similar on both platforms – Measure your game on Windows – Results usually also apply to Xbox 360 • There are many great Windows perf tools – The CLR Profiler for garbage collection issues – Sampling profilers: Visual Studio Team System, ANTS, NProf, Optimizeit, VTune – PIX Slide from Shawn Hargreaves, “Understanding XNA Framework Performance”CLR Profiler on Windows Slide from Shawn Hargreaves, “Understanding XNA Framework Performance”Re-entering the Framework 23 • GraphicsDevice is somewhat thread-safe – Cannot render from more than one thread at a time – Can create resources and SetData while another thread renders • ContentManager is not thread-safe – Ok to have multiple instances, but only one per thread • Input is not threadable – Windows games must read input on the main game thread • Audio and networking are thread-safe Slide from Shawn Hargreaves, “Understanding XNA Framework
View Full Document