This paper covers the methods to collect the appropriate information for your title to assist the Xbox Advanced Technology Group (ATG) in their analysis of non-graphics performance issues.
The first step in looking for non-GPU issues is to follow the steps in the following white papers; these are the same steps ATG would perform on initial investigation. Initial investigation into issues by your team is always preferable; you know your code and how it should react, and trouble spots should become apparent.
The next step in starting any engagement with the ATG is to work with your Developer Account Manager (DAM). They will be able to determine the appropriate contacts based on your needs, and will serve as your liaison and champion throughout the entire engagement. When in doubt, always check with your DAM.
Different areas of a title require different tools to collect information. You don’t want to use a GPU frame capture to determine if your file loading code could be improved. Conversely, using Event Tracing for Windows (ETW) to capture data will not give a detailed look into how the L1 data cache is being used on the CPU.
If possible, a copy of your latest build along with matching symbol files (PDBs) is preferable for ATG. This build should be an encrypted packaged build using the test encryption key. It will allow ATG to take captures to narrow down in specific areas. If you can’t supply a build, follow the steps in this paper to collect the best data to give to ATG.
The following data is always needed:
The two main trouble spots that show up with CPU issues are cache usage and threading usage. We recommend that captures are sent over for both types because they can be very closely related. All of the following captures should be taken in as similar locations as possible in your title. This will allow better correlation between the data.
Improper cache usage patterns can have a very detrimental effect on performance; access times for a cache miss are approximately 100x slower than a cache hit. Take a look at the following white papers for more details on the costs:
The Performance Investigator for Xbox (PIX) is the only tool available for Xbox One that collects the required data to analyze cache and branch issues.
To capture data by using PIX:
Figure 1. Function Summary Capture command. 
Threading issues fall into several categories:
Both PIX and Event Tracing for Windows (ETW) collect data that is very useful in tracking down the location of any threading issues.
To capture data by using PIX:
Figure 2. Timing Capture command. 
Timing captures require PIX events/markers with enough granularity to determine where time is being spent, and as proper thread names are also important. This helps ATG to understand the flow of your engine and to narrow attention to specific hotspots within the title. It also helps your team to stay on top of any possible performance issues that may be introduced during day-to-day development. Specific tips:
Xbperf uses tracelog as its underlying collection mechanism, and tracelog is built on top of Event Tracing for Windows (ETW). ETW is built into the operating system at the driver level, which allows for very low-level data collection. Using tracelog directly allows fine-grained access to enable specific system events to reduce the overhead to acceptable levels.
All file loading data should be done by using an encrypted packaged build. You can create these by using the makepkg utility supplied with the XDK. Make sure that you use the /lt option to encrypt the package with a test encryption key. Without this step, the resulting data collected will not match the characteristics seen by your customers.
The steps for capturing data for both a level load pattern and a streaming pattern are similar. The only major difference is where you perform the capture in your title.
To capture data by using PIX:
Figure 3. File IO Trace command. 
Figure 4. PIX Capture in progress dialog. 
In some cases, there may be close relationships between general CPU usage and file loading performance. In these cases, it’s necessary to collect CPU data along with the matching file loading operation. Using the included file loading batch file is the best way to achieve this.
To capture data by using ETW:
All network traces should be taken with the maximum number of users in a multiplayer session. Each user profile should have at least 20 friends. This will create a representative set of data to the average play session when running retail.
If your title is using a custom security solution (UDP/TCP) over insecure sockets to dedicated servers, a security review is needed. If your publisher has already obtained an exception, a security review can be skipped. For details, see the Xbox One Secure Communication Requirements white paper.
Fiddler is a web debugging proxy that logs all HTTP and HTTPS traffic between your Xbox One dev kit and the Internet. You will use it to log and inspect traffic to and from the Xbox services and relying party web services, to understand and debug web service calls.
In normal operation, a console that communicates through a proxy is at risk of having its communications modified by the proxy, possibly allowing players to cheat. Thus, consoles are designed to not allow communication through a proxy. Using Fiddler with your Xbox One dev kit requires that you perform some special configuration steps on the dev kit to allow it to use the Fiddler proxy.
Fiddler is freeware, and can be downloaded from the Fiddler website. You’ll find detailed instructions for using Fiddler in both UWP and Xbox One titles in Troubleshooting Xbox Live using Fiddler. Alternatively, for Xbox One titles, follow the instructions in the next section.
To install and enable Fiddler to monitor traffic from your dev kit:
| Setting | Preferred Value |
|---|---|
| Name | FiddlerProxy |
| Group | (do not set a value for Group) |
| Profile | All |
| Enabled | Yes |
| Action | Allow |
| Override | No |
| Program | path to fiddler.exe |
| LocalAddress | Any |
| RemoteAddress | Any |
| Protocol | TCP |
| LocalPort | Any |
| RemotePort | Any |
| AllowedUsers | Any |
| AllowedComputers | Any |
To capture data by using Fiddler:
After a Fiddler capture is available, title developers can self-diagnose Xbox Live service call patterns by using the Xbox Live Trace Analyzer (LTA) tool. This tool parses a Fiddler trace and looks for incorrect calling patterns that will cause issues for the title or Xbox Live Services.
The Xbox LTA tool download and runtime instructions are available online. We highly recommend that title developers run this tool and review the output.
Always work with your Developer Account Manager when you want to engage ATG for help in locating performance issues. They will be able to provide you with a wealth of resources that may help you solve your issues before escalation.
Following the provided steps over a representative section of your title will provide the best data for ATG. If possible, create multiple captures for both a performant steady state along with trouble spots for comparison. When in doubt, always err on the side of more data.
Quality performance data is vital when working with ATG, and this will allow them to recommend the best solutions for any issues they find. The first thing ATG will ask for are similar captures to the ones provided here. By following the steps provided, you will get ahead of the curve and allow ATG to help you more quickly.
echo OFF
REM Use the name on the command line for the capture or use the default
set ETWName=%1
if "%1"=="" set ETWName=ThreadData
set SavePath=d:\
xbdir /x/title xd:\profile > NUL
if %ERRORLEVEL% EQU 0 set SavePath=%SavePath%profile\
REM Start the capture on the default Xbox
xbrun /x/title /O tracelog -start %ETWName% -f %SavePath%%ETWName%.etl -eflag
DISPATCHER+PROC_THREAD+PROCESS+THREAD+VIRT_ALLOC+LOADER+CSWITCH+PROFILE -stackwalk PROFILE+CSWITCH+VIRT_ALLOC+READYTHREAD
REM Wait for the user to press a key when the session has finished capturing
PAUSE
REM Stop the capture, merge the file to resolve events, finally copy the etl file over to the PC
xbrun /x/title /O tracelog -stop %ETWName%
xbrun /x/title /O tracelog -merge %SavePath%%ETWName%.etl %SavePath%%ETWName%_merge.etl
xbcp /x/title x%SavePath%%ETWName%_merge.etl
start %ETWName%_merge.etl
echo OFF
REM Use the name on the command line for the capture or use the default
set ETWName=%1
if "%1"=="" set ETWName=FileData
set SavePath=d:\
xbdir /x/title xd:\profile > NUL
if %ERRORLEVEL% EQU 0 set SavePath=%SavePath%profile\
REM Start the capture on the default Xbox
xbrun /x/title /O tracelog -start %ETWName% -f %SavePath%%ETWName%.etl -eflag
PROC_THREAD+LOADER+FILENAME+DISK_IO+DISK_IO_INIT+INTERRUPT+CSWITCH+PROFILE -stackwalk PROFILE+CSWITCH+DiskRead+DiskWrite+DiskFlush
REM Wait for the user to press a key when the session has finished capturing
PAUSE
REM Stop the capture, merge the file to resolve events, finally copy the etl file over to the PC
xbrun /x/title /O tracelog -stop %ETWName%
xbrun /x/title /O tracelog -merge %SavePath%%ETWName%.etl %SavePath%%ETWName%_merge.etl
xbcp /x/title x%SavePath%%ETWName%_merge.etl
start %ETWName%_merge.etl