Trace window transitions using Winscope

Winscope is a web tool that lets users record, replay, and analyze the states of several system services during and after animations and transitions. Winscope records all pertinent system service states to a trace file. Using the Winscope UI with the trace file, you can inspect the state of these services for each animation frame, with or without a screen recording, by replaying, stepping, and debugging through the transitions.

Supported traces

Winscope provides the ability to gather and visually represent various traces or sequences of system service states. You can configure these traces to suit specific use cases, ranging from low overhead to high verbosity. The following traces are supported by Winscope:

  • EventLog: Collect the system diagnostic event record using EventLog. In Winscope this information is used only to identify and display CUJ markings.
  • IME: Trace events from the Input Method Editor (IME) pipeline, including IMS, IMMS, and IME Client.
  • Input: Trace input events from various parts of the input event pipeline.
  • ProtoLog: Collect ProtoLog messages from system services and the code of system services running in client processes.
  • Screen recording: Collect a screen recording alongside the traces.
  • Shell transitions: Record window and activity transition system details.
  • SurfaceFlinger: Collect SurfaceFlinger traces containing information about surfaces (layers) such as position, buffer, and composition.
  • Transactions: Trace the set of atomic changes received by SurfaceFlinger using SurfaceControl for composition.
  • ViewCapture: Capture a range of properties of all the views from system Windows that support ViewCapture, like System UI and Launcher.
  • Window Manager: Trace Window Manager states containing details pertaining to windows, including input and focus events, screen orientation, transitions, animations, positioning, and transformations.

Supported dumps

Winscope can collect and display state dumps, which are snapshots of the device's state taken at specific moments defined by the user. Unlike traces, which are continuously collected during device usage and can impact performance, dumps are taken only at these user-defined moments, ensuring that performance and verbosity are not compromised. This allows for a more focused and efficient analysis of the device's state at specific points in time. The following dumps are supported by Winscope:

  • Window Manager: Dump a single Window Manager state.
  • SurfaceFlinger: Dump a single SurfaceFlinger snapshot.
  • Screenshot: Collect a screenshot alongside the dumps.

See Run Winscope for information on building and running Winscope.

See Capture traces for information on collecting traces.

See Load traces for information on how to load traces using the Winscope Web UI.

See Analyze traces for information on analyzing traces.