Xbox One X: PIX Enhancements in the June 2017 XDK
The Xbox One X dev kit includes several new capabilities that have enabled new scenarios and a greatly improved workflow when using PIX. Capabilities such as the additional tooling memory and the Xbox Transfer Device allow for longer captures and have enabled a significantly reduced iteration time for capturing and analysis.
The June 2017 version of PIX incudes several new capabilities across all capture types. These enhancements are aimed at helping you tune your title for optimal performance on Xbox One X and the other devices in the Xbox One family.
Improved iteration times using Fast Title OS startup and the Xbox Transfer Device
PIX utilizes the high-speed Xbox Transfer Device that ships with Xbox One X dev kits to significantly reduce the time it takes to capture and analyze GPU data. Furthermore, PIX now avoids restarting the title OS when starting analysis, which reduces the time it takes to analyze GPU captures. With both of these features enabled you should see capture and analysis take no more than a few seconds for average-sized captures. To use the Xbox Transfer Device, make sure the cable is connected to a USB 3.0 port on your PC and one of the USB ports on the back of your Xbox One X dev kit.
If you encounter any issues with these options enabled, please contact your DAM. You can disable the use of the Xbox Transfer Device by running the following command:
xbconfig PixFastTransportMode=off
To force PIX to restart the title OS each time for analysis, use the following command:
xbconfig FastIterationMode=off
System Monitor improvements
The System Monitor has been significantly enhanced and we’ve enabled combined collection of system monitor counters, continuous timing data, as well as a video clip of the running title. All of this can be saved into a new capture type.
When monitoring counters for your game using the System Monitor you can start continuous timing capture. This records the counters as well as the timing events from the title. The recorded section is highlighted in green on the graphs. When you stop the timing capture, press the Download button to turn all the recorded data into a capture that contains counters, events, and game play video for the duration of collected data. You can also select a sub-range in the graph and download just that portion of the data. This can be saved and opened later to examine System Monitor counters, Timing Capture events, and the video recording of the title—even after your title has exited.
The video recording is useful for understanding correlation between counters and what the title was doing at the time. Perhaps there was a spike in frame time because of excessive effects in the game? With the video, you can easily tell.
If you don’t want to save the captured data, you can select up to two seconds and open that directly as a timing capture just as before. This can also be done later if you save the capture as described.
In addition to that, graphs can now be customized to your liking. You can change the Y-axis scale of the counters, individually or in groups, to create a more natural and understandable display. There are new columns of data available as well, such as min, max, mean, and standard deviation. There are also new ways to display data (called “Gizmos”) that you can place in the graph area that display data in other forms such as bars, speedometers, and so on.
GPU capture improvements
We’ve made the following improvements to GPU captures in Xbox One X:
- This release brings several updates and new features to the shader debugger. The new Callstack view allows you to track execution of your shaders. The GPU instructions view now interleaves HLSL code to quickly show you the relationship between the HLSL source and the compiled code. This works only for precompiled shaders and requires that PIX can access PDBs for the shaders. The Autos and Watch views now track and highlight changes as you step through the code. In addition, we have added options to allow you to step and run backwards through the code when debugging. Finally, we’ve taken the first steps to improve our shader edit-and-continue experience by combining the debugging and editing view into a single editor.
- All of the relevant PIX views have been updated to show Xbox One X-specific details, as follows:
- Peak rates and bottlenecks are updated to reflect Xbox One X specification details.
- New hardware counters for Xbox One X are available in the Counters view.
- Dr. PIX and derived counters are updated to reflect Xbox One X hardware.
- The GPU State view shows Xbox One X-specific registers.
- The Command Disassembly view shows new Xbox One X packets.
- The Pipeline view, resource viewers, and State view are updated to handle DCC textures, compressed depth buffers, and new tiling modes.
- The Xhit capture view shows details specific to GPU hangs on Xbox One X.
- With the introduction of Xbox One S and Xbox One X, PIX now supports three different platforms. This is reflected in the Xbox connection view, which shows a dedicated icon for each device type, the Details view that shows additional information such as platform, modes, and OS version, and in GPU captures that store the actual platform settings for the capture. Details about the capture are listed in the File Details view. You can analyze original Xbox One and Xbox One S captures on your Xbox One X dev kit. You can even play back captures of original Xbox One games captured on Xbox One X on your Xbox One and Xbox One S. Native Xbox One X titles can be captured and analyzed only on Xbox One X dev kits. Please be aware that while you can use your Xbox One X dev kit as your primary dev kit, PIX doesn’t try to emulate the exact speeds of Xbox One or Xbox One S. For accurate timings, you should still test on these platforms.
- The new ToolingMemoryOverflow option for the Configuration (xbconfig.exe) command-line tool allows you to configure whether PIX can use title memory if it exhausts dedicated tooling memory. You’ll be able to control this directly from PIX in an upcoming release of PIX, but for now this must be configured using xbconfig. Use the option as follows:
xbconfig ToolingMemoryOverflow=true|falseIf you set this option to false, PIX cannot use title memory. If you set this option to true, PIX is allowed to use title memory if needed. The amount of memory allocated to the title and tools can be controlled with the new ExtraTitleMemory option for xbconfig. The available extra memory depends on the dev kit used. On an Xbox One X dev kit the title can allocate up to 12,288 MB of additional memory. We recommend leaving at least 512 MB on Xbox One and Xbox One S and at least 2 GB on Xbox One X for tools. Some operations could require that significantly more memory is available to PIX, so please adjust as necessary.
- The Events view is updated for DirectX12 GPU captures to show sub-API events in square brackets, such as [Clear Buffer] and [Fence Write]. This helps distinguish between user events and driver events. The hierarchy of sub-API events, if present, is shown below the API events. A new button (![ ]) is provided to let you filter out these events.
Timing Capture improvements
We’ve made the following improvements to Timing captures in Xbox One X:
- We have optimized the performance of timing captures significantly by using the same data streaming approach we use for GPU captures.
- Previously, PIX would not capture thread names for threads that did not emit events during a timing capture. We have removed this limitation and PIX now shows the names for all named threads captured.
- Timing captures now include an analysis that identifies the set of events that represents the hotpath in terms of CPU time for a frame. Reducing the time taken by this set of events will have the most direct impact on frame time from a CPU perspective.
- Cross-OS calls can take a significant amount of time, up to several milliseconds. These calls should be done on non-time critical threads whenever possible. The Timeline tab includes a new context switch view that helps you easily walk through all context switches and identify Cross-OS calls. The interface your title called that caused the Cross-OS call is provided. This view makes it easy to find Cross-OS calls that occur either more often than they need to, or are done on threads that are critical to overall frame time.
Callgraph capture improvements
We’ve made the following improvements to Callgraph captures in Xbox One X:
- The context switch view that helps you to identify Cross-OS calls is now included on the Timeline tab for Callgraph captures.
Instruction Trace capture improvements
We’ve made the following improvements to Instruction Trace captures in Xbox One X:
- Instruction trace captures now identify the data type in your title that is associated with each memory access. As you’re drilling through the virtual address space using the Memory Map tab, information about the types accessed (including a full layout of the type) is shown. The source and assembly code that triggered the access is provided. You’ll also see where in a cache line each instance of a type resides along with the set of fields within that type that have been accessed. Data type tracking helps you lay out your types to make optimal use of the memory caches.
File I/O capture improvements
We’ve made the following improvements to File I/O captures in Xbox One X:
- After profiling the startup of your title or the loading of a level, you can use the Usage tab to determine the set of files that belong in that chunk of your package layout. Once those files are identified, the File I/O profiler can now generate the XML that defines that chunk. This section of XML can then be pasted into your layout file.
- The Usage tab in File I/O captures now includes the ability to add existing traces to the file usage analysis. The ability to merge multiple traces in this way enables you to get a more complete picture of each file’s usage. It’s common to have different portions of an asset file touched by different playthroughs of a given level. Merging the data from multiple playthroughs provides a more accurate analysis of the set of data that is required for a given level.
- An option to collect disk activity that occurs in the System Partition is now available. This data helps you correlate disk access in the Exclusive Partition made within your title to disk activity that occurs in the System Partition. Data from the System Partition can be accessed using the Open in WPA button on the filter bar in File I/O captures.
Memory Capture Improvements
We’ve made the following improvements to memory captures in Xbox One X:
- The Summary page now includes a table that describes how much of the physical memory available to the Exclusive Partition is used by the legacy, title, and tooling working sets. Information about the amount of memory required to store your title’s executable images and the amount of memory used by the system’s page table entries is included. A table that provides details on committed virtual memory is also provided. This table categorizes virtual memory based on working set and page size.
- An option to collect data on memory allocated using the XMemAlloc API is now available. The data displayed for allocations made using XMemAlloc includes a graph of memory allocated and freed over time and a summary of the top allocations by size. The contents of the XALLOC_ATTRIBUTES structure and a full callstack is displayed for every allocation.