Timing Captures
PIX timing captures record information about when each piece of work was carried out by the CPU and GPU. This data is gathered while the game is running, and with minimal overhead, so you can see things like how work is distributed across CPU cores, the latency between graphics work being submitted by the CPU and executed by the GPU, when file IO accesses and memory allocations occur and so on.
Timing captures display time-oriented data from a variety of sources both from within your title and from the system itself. Data from the instrumentation you’ve added to your code using PIX events and PIX markers will always be displayed. PIX can also be configured to collect and analyze data additional data, such as CPU samples, memory allocations, file accesses, GPU timings and counter data. These additional types of data enable more profiling scenarios, but also increase the overhead of collection.
This implementation of Timing Captures offers several advantages over the deprecated, legacy Timing Captures, including:
- Longer capture durations. Existing Timing Captures allow you to view a maximum of 2 seconds of profiling data. Capture durations are significantly extended in the new implementation. Capturing for durations on the order of hours is now supported.
- Faster capture opening times. New Timing Captures open much more quickly than existing Timing Captures. With larger captures, it’s not practical for PIX to show all the data immediately, but the goal is to show you enough data to get started within a few seconds.
- Improved analysis tools. A Metrics View has been added to Timing Captures to help you analyze the large volumes of data present in larger captures. This new view allows you to graph metrics such as event durations and counter values. Graphing multiple metrics together allows you to see correlations between the performance characteristics of different PIX events and counters in your title.
- Integration of additional data sources. The addition of counter data (both system-defined and title-defined) to Timing Captures enables you to correlate the value of various counters with the code that is executing in your title at any point in time. For example, you can correlate the value of title-defined metrics like “NumEnemies” with the PIX events in your title. Other data types, such as information on memory allocations and file accesses are also provided.
- Numerous improvements to the Timeline. The Timeline view includes numerous usability and navigation improvements. For example, you can now see Core and Thread activity together in one view, and context switches are easier to find and analyze.
Taking a Capture
The Device Connection tab currently includes two buttons for taking Timing Captures. One button is used to take a legacy Timing Capture (deprecated) while the other button is used to take the Timing Capture described in this documentation topic. The ability to take either a legacy or a new capture will remain in PIX until the new Timing Captures contain more of the features the current captures do.
Before starting a new capture, select the types of data to collect in addition to PIX events and PIX markers using the Options pane on the button labeled Start Timing Capture. Options include the collection of:
The Capture Output Directory on your development PC can also be customized. While a capture is running, PIX stores the capture data in a file on your PC’s hard drive. Changing the default Capture Output Directory is useful for a few reasons. The first is available disk space. The size of the capture data can be quite large for long running captures. It’s not unusual to see capture files in the 10’s of GBs or more, for example. If the drive on which the Capture Output Directory is stored may be too small, you may want to change the Capture Output Directory such that it’s on another drive. You may also want to change the storage directory based on the type of disk hardware you have. While not, required, using an SSD to store capture data is desirable from a performance perspective.
PIX requires access to your title’s PDBs to display function information in Timing Captures. See Configuring PIX to access PDBs for CPU Captures for information on generating PBDs and configuring PIX to access them.
After you’ve set your capture options and configured PDB access, select Start Timing Capture to start the capture.