Rendering Performance: Tracer for OpenGL ES
Use Tracer for OpenGL ES to capture OpenGL ES calls for an application.
Tracer is a profiling tool that comes with the ADT Bundle.
- Under Windows: the simplest method for using Tracer is to run the monitor.bat file that is installed with the ADT Bundle. This can be found in the ADT bundle installation folder (e.g., C:\android\adt-bundle-windows-x86_64-20131030) under the sdk/tools folder. Just double-click monitor.bat to start Android Debug Monitor.
- Go to Windows -> Open Perspective… and select Tracer for OpenGL ES.
- Click the Trace Capture button shown below.
Figure 6. Tracer for OpenGL ES - Fill in the Trace Options and select Trace.
Note: A quick way to find the package name and Activity is to launch your app with logcat running. The Package Manager getActivityInfo line will display the information, e.g., com.Oculus.Integration/com.unity3d.player.UnityPlayerNativeActivity.
Note: Selecting any Data Collection Options may cause the trace to become very large and slow to capture.
Tracer will launch your app and begin to capture frames.
- Enable the following options:
- Collect Framebuffer contents on eglSwapBuffers()
- Collect Framebuffer contents on glDraw*()
- Once you have collected enough frames, choose Stop Tracing.
- Select the button highlighted above in red to import the .gltrace file you just captured. This can be a lengthy process. Once the trace is loaded, you can view GL commands for every captured frame.