Analyzing your game performance using Event Tracing for ...

Analyzing your game performance using Event Tracing for Windows

Event Tracing for Windows (ETW) is a kernel-level tracing mechanism that logs various system events to a log file. This log can then be viewed to debug your application or determine where performance issues are happening. These events are generated by system components called providers, which make it possible to capture very fine, detailed pieces of data that can be used to analyze program performance characteristics.

Event Tracing for Windows is supported on all Windows-based platforms, and can be used to profile the Unity Editor, Standalone players and Windows Store players running on all PCs and devices.

Profiling using Event Tracing for Windows is a two-step process:

1. Run an application and record the trace log (this is carried out on the target machine) 2. Analyze the trace log (this is carried out on the developer's machine) Running Event Tracing for Windows on a PC allows both event log capture and analysis on the same machine. The recorded event trace file can be recognized by the .etl file extension.

NOTE: It is important not to profile an application running in the Unity Editor unless it has been determined that the problem is caused by doing so, as performance characteristics will be slightly different to the final built game and may give inaccurate results.

Recording a trace on PC

The most straightforward way to capture traces on a PC is to use Windows Performance Recorder (wprui.exe).

Open Windows Performance Recorder and take a look at the list of available Event Provider profiles that you can enable for the capture. You can also add custom profiles, which allow you to only enable capture for the things you are interested in (see #Custom ETW Capture Profiles). NOTE: Profiles are resource-intensive. It is important to minimize the number of enabled profiles where possible, as this reduces the overhead for the capture, makes the captured trace log smaller, and reduces the chance that events are dropped. If you have a lot of profiles enabled, you risk a massive capture trace log potentially several gigabytes per minute of capture. Select what you want to profile and click the Start button to initiate the capture.

When the capture is finished, click the Save button and, if required, fill in the detailed description box that appears. This box is optional; leave it blank if you don't need to record a problem for future reference. Click Save again to exit this window.

Windows Performance Recorder can take a while to save the trace log, especially if you're running it for the first time on the target machine. When the save is complete, you are asked whether you want to open it. Click "Open in WPA" to analyze the trace log in Windows Performance Analyzer.

Recording a trace on a Windows phone

The most straightforward way to capture traces on a Windows phone is to use the (Field Medic) [] app. Install the app and launch it from the target device.

From the main menu, tap Advanced to select the ETW Event Providers to use for the capture.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download