Technical update — 2026-10-13: This page is dated 2019 and retains update records from earlier tutorials. The old Systrace tooling workflow is obsolete. Read historical screenshots, source code and experiments against the Android versions stated in each article; they do not describe every current implementation. Start with the Perfetto series below for current capture and analysis workflows.
As Systrace and Android changed, my earlier tutorials started to show their age. I had also learned to read more from a trace, which helped me solve performance problems. I wanted to write those things down and get better at explaining what I had learned. If the notes helped someone else too, all the better.
The purpose of this series is to view the overall operation of the Android system from a different perspective using Systrace, while also providing an alternative angle for learning the Framework. Perhaps you’ve read many articles about the Framework but can never remember the code, or you’re unclear about the execution flow. Maybe from Systrace’s graphical perspective, you can gain a deeper understanding.
Perfetto has essentially replaced Systrace in my daily work. Many newcomers to Android performance optimization find Perfetto’s busy interface and numerous features overwhelming. They have asked me to present the earlier Systrace articles using Perfetto. Android’s SDK Platform-Tools notes identify the old systrace tool as superseded. That does not mean ATrace instrumentation or kernel ftrace has been deprecated as well.
Read this index along two lines: the Systrace articles retain the Framework flows and case studies of their time; the Perfetto articles cover capture, viewing, search, SQL and large-trace analysis, alongside system mechanisms. Changing the viewer does not make the function names, thread relationships or timing in an old screenshot applicable to every newer system.
Getting Started Today: Tools and Versions
| Entry point or capability | Version and scope |
|---|---|
Legacy systrace.py |
The historical workflow typically produces an HTML report. Do not assume a current Platform-Tools installation still contains the script at the old tutorial’s path. |
| System Tracing in Developer options | Available from Android 9 / API 28. Android 9 saves Systrace format (.ctrace); Android 10 / API 29 and later save Perfetto format (.perfetto-trace). |
On-device perfetto and tracing services |
Platform services exist from Android 9 and are enabled by default from Android 11 / API 30. Some Android 9 and 10 devices need an extra enabling step; check the official instructions and device support. |
| Perfetto UI and command-line analysis | The UI can display Perfetto and supported legacy Systrace formats; trace_processor supports local SQL analysis. A filename extension does not guarantee complete data. |
| FrameTimeline | Available from Android 12 / API 31, with its data source actually recorded. Opening an old trace in a new UI cannot add frame data that was never captured. |
Version references: on-device System Tracing, Perfetto Android capture guide, and FrameTimeline. The current graphical recording tutorial assumes Android 11+; for older devices, use its command-line branch. See Recording system traces.
Start with Perfetto 1–3 and capture a short scenario, then follow the particular problem into MainThread, RenderThread, CPU or Binder analysis. Record the device, Android/ROM version, refresh rate, app version and trace configuration. Before naming a bottleneck, confirm that the relevant time range, threads and data sources are present. A missing track may reflect configuration, permissions, device support or lost data; it does not mean zero time was spent there.
App developers can start with the system’s capture tools. Experiments that modify Framework code, change Buffer configuration or enable privileged data sources require the appropriate system build and permissions. You do not need to modify the OS before learning to read a trace, and not every experiment from a platform development environment applies to a retail device.
Perfetto Series Index
- Android Perfetto Series Index
- Android Perfetto Series 1: Introduction to Perfetto
- Android Perfetto Series 2: Capturing Perfetto Traces
- Android Perfetto Series 3: Getting Familiar with Perfetto View
- Android Perfetto Series 4: Opening Large Traces Locally Using Command Line
- Android Perfetto Series 5: Android App Rendering Pipeline Based on Choreographer
- Android Perfetto Series 6: Why 120Hz? Advantages and Challenges of High Refresh Rate
- Android Perfetto Series 7 - MainThread and RenderThread Explained
- Android Perfetto Series 8: Deep Dive into Vsync Mechanism and Performance Analysis
- Android Perfetto Series 9 - CPU Information Explained
- 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 Article Index
I’ll keep the series collected on this page as I add articles.
When migrating from the old Systrace series to the current Perfetto workflow, start with this mapping:
| Systrace topic | Matching Perfetto articles |
|---|---|
| Introduction, prerequisites, capture and opening | Perfetto 1 / Perfetto 2 / Perfetto 3 |
| Why 60 fps and high refresh rate | Perfetto 6 |
| Choreographer, MainThread, RenderThread, jank analysis | Perfetto 5 / Perfetto 7 |
| Vsync, SurfaceFlinger, Triple Buffer | Perfetto 8 |
| CPU and thread states | Perfetto 9 |
| Binder, lock contention, SystemServer waits | Perfetto 10 |
| Startup, responsiveness and input-to-first-frame latency | Perfetto 18 |
- Systrace Introduction
- Systrace Basics - Systrace Prerequisites
- Systrace Basics - Why 60 fps?
- Systrace Basics - SystemServer Explained
- Systrace Basics - SurfaceFlinger Explained
- Systrace Basics - Input Explained
- Systrace Basics - Vsync Explained
- Systrace Basics - Vsync-App: Detailed Explanation of Choreographer-Based Rendering Mechanism
- Systrace Basics - MainThread and RenderThread Explained
- Systrace Basics - Binder and Lock Contention Explained
- Systrace Basics - Triple Buffer Explained
- Systrace Basics - CPU Info Explained
- Systrace Smoothness Practice 1: Understanding Jank Principles
- Systrace Smoothness Practice 2: Case Analysis - MIUI Launcher Scroll Jank Analysis
- Systrace Smoothness Practice 3: Questions During Jank Analysis
- Systrace Response Speed Practice 1: Understanding Response Speed Principles
- Systrace Response Speed Practice 2: Response Speed Analysis - Using App Startup as an Example
- Systrace Response Speed Practice 3: Extended Knowledge on Response Speed
- Systrace Thread CPU State Analysis Tips - Runnable
- Systrace Thread CPU State Analysis Tips - Running
- Systrace Thread CPU State Analysis Tips - Sleep and Uninterruptible Sleep
2023-10 update:
Starting to prepare the Perfetto series (historical progress; published articles are listed above)
Target Audience
This series of articles is suitable for both application developers and system developers. I will consider both perspectives when writing. As a system developer, here are roughly my advantages:
- Access to system source code, making it convenient to debug and modify code, and see results on the phone at any time
- Certain understanding of the system framework
- Certain understanding of system tuning
That background lets me cover a few things from the system developer’s side:
- Learning Android Framework through Systrace
- Modifying certain system configurations to show everyone the results: for example, the impact of Buffer count on applications
- Introducing considerations and trade-offs that system manufacturers make when building systems
- Introducing important but often overlooked points during application development
Update Log
The historical update records are retained below; their dates do not always match the dates in current article URLs.
The plan is to update one article per week, giving myself a goal and accountability.
- 2018-03-30 Index update: Systrace Series Article Index
- 2018-04-01 Article update: Systrace Basics - Why 60 fps?
- 2019-07-23 Article update: Systrace Basics - Systrace Prerequisites
- 2019-10-22 Article update: Systrace Basics - Vsync-App: Detailed Explanation of Choreographer-Based Rendering Mechanism
- 2019-11-04 Article update: Systrace Basics - Input Explained
- 2019-11-06 Article update: Systrace Basics - MainThread and RenderThread Explained
- 2019-12-01 Article update: Systrace Basics - Vsync Explained
- 2019-12-06 Article update: Systrace Basics - Binder and Lock Contention Explained
- 2019-12-15 Article update: Systrace Basics - Triple Buffer Explained
- 2019-12-21 Article update: Systrace Basics - CPU Info Explained
- 2020-02-04 Article update: Systrace Basics - SystemServer Explained
- 2020-02-14 Article update: Systrace Basics - SurfaceFlinger Explained
- 2021-04-24 Article update: Systrace Smoothness Practice 1: Understanding Jank Principles
- 2021-04-24 Article update: Systrace Smoothness Practice 2: Case Analysis - MIUI Launcher Scroll Jank Analysis
- 2021-04-24 Article update: Systrace Smoothness Practice 3: Questions During Jank Analysis
- 2021-10-28 Article update: Systrace Response Speed Practice 1: Understanding Response Speed Principles
- 2021-10-28 Article update: Systrace Response Speed Practice 2: Response Speed Analysis - Using App Startup as an Example
- 2021-10-28 Article update: Systrace Response Speed Practice 3: Extended Knowledge on Response Speed
About Me && Blog
Below is my personal introduction and related links. I look forward to exchanging ideas with fellow professionals. When three walk together, one can always be my teacher!
- Blogger Introduction: Contains my personal WeChat and WeChat group links.
- Blog Content Navigation: A navigation guide for my blog content.
- Curated Collection of Excellent Blog Articles - Android Performance Optimization Must-Knows: Welcome to recommend articles (via WeChat private message)
- Android Performance Optimization Knowledge Planet: The paid community stopped operating in 2026 and no longer accepts new members; this link preserves its history.
One person can walk faster, but a group can walk further
