This is the third article in the Perfetto series. After introducing what Perfetto is and how to capture traces, this article focuses on how to navigate the web interface and interpret the complex information presented after opening a trace.
Table of Contents
- Perfetto Series Catalog
- The Perfetto Landing View
- The Trace Interface
- Basic Operations
- Usage Tips and Tricks
- Summary
Paul Graham once said: “Either provide something most people want a little, or something a few people want a lot.“ Perfetto is exactly what a dedicated minority “wants a lot.” Let’s begin.
This series aims to provide a fresh perspective on Android system operation through Perfetto. It offers a unique angle to study App, Framework, and Linux internals. Through graphical tools like Perfetto, you may gain much deeper insights.
Perfetto Series Catalog
- Android Perfetto Series Catalog
- Android Perfetto Series 1: Introduction to Perfetto
- Android Perfetto Series 2: Capturing Perfetto Traces
- Android Perfetto Series 3: Familiarizing with the Perfetto View
- Android Perfetto Series 4: Opening Large Traces via Command Line
- Android Perfetto Series 5: Choreographer-based Rendering Flow
- Android Perfetto Series 6: Why 120Hz? Advantages and Challenges
- Android Perfetto Series 7: MainThread and RenderThread Deep Dive
- Android Perfetto Series 8: Understanding Vsync and Performance Analysis
- Android Perfetto Series 9: Interpreting CPU Information
- Video (Bilibili) - Android Perfetto Basics and Case Studies
The Perfetto Landing View
Once you’ve captured a trace, you typically open it at ui.perfetto.dev. (If you used the official capture script, it opens automatically).

You can click “Open trace file” or simply drag and drop your file into the white area.
The Trace Interface
After opening a trace, you’ll see the main analysis interface:

The interface is divided into four main sections:
- Sidebar (Right): Contains high-frequency tools:
- Show timeline: Returns to the main trace view.
- Query: Where you write SQL to query the trace database.
- Metrics: Ready-to-use analysis reports provided by the system.
- Info and stats: Metadata about the trace and the target device.
- Timeline Header (Top): Primarily used for time-referencing.
- Content Area (Center): Where most analysis happens. Traces are grouped by function (CPU usage, Ftrace events) or by App Process (Threads, Input events, Binder calls, Memory, etc.).
- Info Panel (Bottom): Displays details for any selected slice, log, or event.
Basic Operations
Perfetto’s UI is incredibly smooth, handling multi-GB files far better than Systrace ever could.
The navigation shortcuts are similar to Systrace:
- W / S: Zoom In / Zoom Out.
- A / D: Pan Left / Pan Right.
- Mouse Click: Select a slice or area.

Key Shortcuts to Master:
- f: Zoom and center on the current selection.
- m: Create a Temporary Mark area. Selecting another area and pressing
mwill remove the previous one. PressEscto clear. - Shift + m: Create a Persistent Mark. These stay until manually removed, perfect for tagging every frame drop in a long trace.
- q: Toggle the Info Panel. Perfetto is screen-intensive, so hiding the bottom panel when not needed is vital.
- Flagging: Hover over the very top of the timeline and click to drop a flag at a specific timestamp.
Usage Tips and Tricks
Identifying Wakeup Sources
Understanding what woke up a thread is key to tracing App and Framework logic. Perfetto makes this much smoother than Systrace.
Method 1: Click the “Runnable” Slice
Click the Runnable (cyan) section before a Running slice. The Info Panel will show Related thread states, including the Waker thread.

Method 2: Track via CPU Info
Click a Running slice and tap the arrow to jump to the CPU core view. Here you can see contiguous execution and follow the chain of wakeups across Different cores.

Analyzing the Critical Path
The Critical Path visualizes all tasks your current selection depends on. If task E is waiting on D, D on C, and so on, Perfetto can highlight this the entire chain.
Click a Running slice and select Critical path in the bottom panel. This collapses dependent wakeups into a single view.

Pinning Threads
Click the thumbtack icon on the far left of any thread name to pin it to the top. This is essential for keeping related threads (like an App’s MainThread and the System’s SurfaceFlinger) together for comparison.

Buffer Consumption Tracking
For apps, the consumer is SurfaceFlinger. By looking at the Actual Timeline in the App process, you can see exactly which SurfaceFlinger frame consumed a specific app buffer.
Detecting App Timeouts
Using the Expected and Actual Timeline tracks, you can see where an app exceeded its rendering budget. Red slices in the Actual Timeline indicate frames that took too long.

Interactive Logs and Events
In the Android Logs tab, hovering over a log line will draw a vertical line on the timeline, showing exactly when it happened. The same applies to the Ftrace events tab.
Running State Analysis
Click and drag to select a region on the CPU State track. The bottom panel will calculate the percentage of time the thread spent in Running, Runnable, Sleep, and Uninterruptible Sleep. This is invaluable for App Launch optimization.

Summary
This article covered the basic interface and navigation of Perfetto, along with several high-impact analysis tips. Google is actively adding new features to the web UI, so expect this tool to only get more powerful over time.
This concludes the Perfetto basics. In the next part of the series, we will dive into specific Android system flows and use SQL queries to solve real-world performance and power consumption issues.
“If you want to go fast, go alone. If you want to go far, go together.”
