ui: SurfaceFlinger layers viewer (com.android.SurfaceFlinger) Adds a SurfaceFlinger layers viewer for the android.surfaceflinger.layers data source. Inspired by the Android Winscope tool. trace_processor: the winscope importer plugin now reports the timestamp bounds of the winscope snapshot tables (SurfaceFlinger layers + transactions, WindowManager, shell transitions, IME, ViewCapture, ProtoLog), mirroring the video/audio frame importers. Previously a trace captured with only the winscope data sources had empty trace bounds and the UI treated it as empty; now it opens directly. Adds read access to those tables' `ts` column. Surfaced two ways onto one shared session: - A nested "SurfaceFlinger" timeline group with one track per display (real and virtual, e.g. a video-encoder/screen-recorder display, which are part of what SurfaceFlinger composited). Each track shows that display's snapshots as frame-numbered, colorized slices; selecting one shows a compact summary plus an inline layout preview and opens the page at that snapshot. - A full-screen page (sidebar > SurfaceFlinger) with a display selector, snapshot time-slider, prev/next, and a jump-to-timeline button that selects the snapshot slice on that display's track. The snapshot index and timestamp are shown consistently in the page and the details panel. Three panes: - Surface: a rotatable, stacked 3D view of the selected display's layer rects, pure 2D-canvas projection (no WebGL). Camera angles follow the standalone tool's mapper3d (pitch = factor*PI/8, yaw = 1.5*pitch); gradient / opacity / wireframe shading; spacing slider; only-visible filter; per-rect hide + pin; click-to-select; and leader-line labels in a side gutter that never overlap and are themselves clickable. - Hierarchy: the full cross-display layer tree with chips (visible / GPU / HWC / relative-Z / hidden / spy / duplicate), only-visible / flat / simplify-names / diff filters and search, and per-node hide + pin toggles. - Properties: a header card (name + chips), a curated summary as a DataGrid (with clickable layer references) and the full proto dump as a filterable DataGrid; with diff on, layers are marked added/modified/deleted and the proto grid gains a Previous column. A layer belongs to a display via its rect's group id, so the Surface scopes to the selected display's composition while the hierarchy/properties span all displays. Built from native widgets (Section, Tree, Chip, DataGrid, Checkbox, TextInput, Select) and themed with the --pf-color-* variables, so it follows the app's light and dark mode. Enabled by default. Change-Id: I2222222222222222222222222222222222222222
Perfetto is an open-source suite of SDKs, daemons and tools which use tracing to help developers understand the behaviour of complex systems and root-cause functional and performance issues on client and embedded systems.
It is a production-grade tool that is the default tracing system for the Android operating system and the Chromium browser.
Perfetto is not a single tool, but a collection of components that work together:
Perfetto was designed to be a versatile and powerful tracing system for a wide range of use cases.
ftrace, allowing you to visualize scheduling, syscalls, interrupts, and custom kernel tracepoints on a timeline.chrome://tracing. Use it to debug and root-cause issues in the browser, V8, and Blink.We‘ve designed our documentation to guide you to the right information as quickly as possible, whether you’re a newcomer to performance analysis or an experienced developer.
New to tracing? If you're unfamiliar with concepts like tracing and profiling, start here:
Ready to dive in? Our “Getting Started” guide is the main entry point for all users. It will help you find the right tutorials and documentation for your specific needs:
Want the full overview? For a comprehensive look at what Perfetto is, why it's useful, and who uses it, see our main documentation page:
For users interested in the Debian distribution of Perfetto, the official source of truth and packaging efforts are maintained at Debian Perfetto Salsa Repository
Have questions? Need help?
We follow Google's Open Source Community Guidelines.