Perfetto has largely replaced the old Systrace workflow in my daily work. Android recommends Perfetto for Android 10 and later and describes the Systrace command-line tool as legacy. Developers new to Android performance analysis often find Perfetto’s interface and features complex, so this series revisits the subjects of my Systrace articles through Perfetto.
Technical review: 2026-10-14. The motivation below dates from the series launch in 2024; the catalog has since expanded. Practical examples mainly start with Android 12, which is not Perfetto’s minimum supported Android version. Check each article’s source tag, device version, and data-source requirements; historical examples are not all Android 17 measurements.
I used to think the Systrace series was enough. Here are the reasons I later shared on Knowledge Planet for writing a Perfetto series:
- In my work around 2024, I saw teams at OPPO and vivo using Perfetto to capture and analyze traces, with many newcomers starting there. If I kept writing only about Systrace, I would miss those readers. This is a personal observation, not a survey of every team or its current tooling.
- The Systrace series references older code. This series continues to add newer behavior; Android 17 (API 37) releases and source tags are available references. Each analysis still depends on its stated AOSP tag, device implementation, and trace. New API documentation is not proof of an older device’s implementation.
- I haven’t fully mastered all of Perfetto’s high-level features myself. Re-writing this series helps me reinforce my own understanding.
- I want to spend time on the Android and Linux behavior we can observe through Perfetto, not just on the tool’s buttons. What is the system doing, why is it doing that, and how does that explain the problem we are investigating?
- Official Perfetto documentation still misses many nuances of Android system operation. I can fill in some of those gaps and explain them in Chinese.
- If the series turns out well, I can also use it for a Google DevFest talk.
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. Please feel free to share feedback or point out errors so I can keep this as accurate as possible.
In this series, I want to use Perfetto to look at how apps, the Framework, and Linux work together. If you have read plenty of source code and performance articles but still find the flow hard to follow, try placing that code on a trace timeline.
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
- Android Perfetto Series 10: Binder Scheduling and Lock Contention
- Android Perfetto Series 11: PerfettoSQL, Trace Processor and Regression Detection
- Android Perfetto Series 12: Trace Dataflow and Data Loss
- Android Perfetto Series 13: Perfetto SDK, Track Event and App Field Traces
- Android Perfetto Series 14: heapprofd and Memory Profiling
- Android Perfetto Series 15: Boot Traces and Long-running Field Tracing
- Android Perfetto Series 16: GPU, Power Counters and Hardware Bottlenecks
- Android Perfetto Series 17: Scenario Automation and Platform Tracing
- Android Perfetto Series 18: Input Response Latency
- Video (Bilibili) - Android Perfetto Basics and Case Studies
- Video (Bilibili) - Android Perfetto: Trace Graph Types - AOSP, WebView, Flutter + OEM System Optimization
Systrace Series
Systrace is a legacy toolchain, but the old series’ Framework flows, thread states, Binder waits, Vsync, SurfaceFlinger, and CPU scheduling remain useful subjects, subject to each article’s version boundaries. From Android 10, the system tracing utility saves Perfetto-format traces. .perfetto-trace is a common extension for protobuf trace data; renaming a file does not convert its format. Perfetto UI and Trace Processor provide visualization, parsing, and SQL analysis. See the official system tracing overview for legacy HTML/ctrace support and conversion.
Perfetto continues to support android.os.Trace, NDK ATrace, and internal ATRACE instrumentation, while ftrace supplies kernel events. Data sources must be enabled in TraceConfig; visibility also depends on OS version, permissions, and device support. An absent event does not prove that the behavior never occurred: it may have been disabled, unsupported, or lost during recording.
If you are coming from the Systrace series, use this mapping:
| Systrace topic | Perfetto content to read first |
|---|---|
| Tool introduction, capture flow, UI operations | Perfetto 1: Introduction, Perfetto 2: Capturing traces, Perfetto 3: Perfetto View |
| Why 60 fps and high refresh rate | Perfetto 6: Why 120Hz? |
| Choreographer, main thread, RenderThread, jank analysis | Perfetto 5: Choreographer rendering flow, Perfetto 7: MainThread and RenderThread |
| Vsync, SurfaceFlinger, Triple Buffer | Perfetto 8: Vsync and performance analysis |
| CPU frequency and Running/Runnable/Sleep states | Perfetto 9: CPU information |
| Binder, lock contention, and SystemServer waits | Perfetto 10: Binder scheduling and lock contention |
| Trace Processor, SQL, and batch regression | Perfetto 11: PerfettoSQL, Trace Processor, and Regression Detection |
| App instrumentation, Track Event, and field traces | Perfetto 13: Perfetto SDK, Track Event, and App Field Tracing |
| Boot traces and long-running field captures | Perfetto 15: Boot and Long-running Field Tracing |
| Input response and first-frame feedback | Perfetto 18: Input Response Latency |
- Introduction to Systrace
- Systrace Basics: Prerequisites
- Systrace Basics: Why 60 fps?
- Systrace Basics: Interpreting SystemServer
- Systrace Basics: Interpreting Input
- Systrace Basics: Vsync Generation and Mechanism
- Systrace Basics: Vsync-App - Choreographer Rendering Explained
- Systrace Basics: MainThread and RenderThread
- Systrace Basics: Binder and Lock Contention
- Systrace Basics: Triple Buffer Explained
- Systrace Basics: Interpreting CPU Info
- Systrace Basics: SurfaceFlinger Explained
- Systrace Smoothness in Practice 1: Understanding Jank
- Systrace Smoothness in Practice 2: MIUI Desktop Scroll Analysis
- Systrace Smoothness in Practice 3: Common Questions
- Systrace Responsiveness in Practice 1: Understanding Principles
- Systrace Responsiveness in Practice 2: Case Study — App Launch
- Systrace Responsiveness in Practice 3: Extended Knowledge
- CPU Thread State Analysis 1: Runnable
- CPU Thread State Analysis 2: Running
- CPU Thread State Analysis 3: Sleep & Uninterruptible Sleep
About Me & My Blog
Here is a quick introduction and relevant links. I welcome communication with fellow developers!
- Author Introduction: Includes my WeChat and community links.
- Blog Content Map: A navigation guide to this blog.
- Android Performance Optimization Skills and Tools: A curated collection of excellent articles.
- The Performance archive: The community closed in 2026 and no longer accepts new members.
“If you want to go fast, go alone. If you want to go far, go together.”
