With Google announcing the deprecation of Systrace in favor of Perfetto, Perfetto has essentially replaced Systrace in my daily workflow. Major manufacturers like OPPO and vivo have also transitioned to Perfetto. Many developers new to Android performance optimization find Perfetto’s complex interface and features overwhelming, which is why I’ve decided to re-present my previous Systrace articles using Perfetto.
This series was born from a few key reasons I shared in my Knowledge Planet (I previously thought the Systrace series was sufficient):
- Industry Transition: Manufacturers like OPPO and vivo have already switched to Perfetto for both capturing and analyzing traces. Many new developers are starting with Perfetto, and keeping only the old Systrace series would leave them behind.
- Modern Codebase: The previous Systrace series was based on older code. This new Perfetto series is updated using Android 14 source code.
- Personal Growth: I haven’t fully mastered all of Perfetto’s high-level features myself. Re-writing this series helps me reinforce my own understanding.
- System-Level Focus: Perfetto is a powerful tool backed by the entire Android and Linux ecosystem. This series focuses on the underlying system principles rather than just the tool itself. Mastery lies in understanding how Android works and using tools to uncover the essence of performance issues.
- Knowledge Gap: Official Perfetto documentation still misses many nuances of Android system operation. This series aims to fill those gaps and provide high-quality Chinese technical content.
- Community Sharing: This content will also serve as material for future technical presentations like Google DevFest.
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.
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. Even if you’ve read many articles on performance optimization, you might still feel confused because it’s hard to visualize the flow or remember the code. 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
Systrace Series
Although Systrace is no longer updated, the core content of the previous Systrace series remains relevant. Many companies still use Systrace to analyze system issues. It is a powerful tool for visualizing system operation and learning the Android Framework.
- 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.
- Android Performance Knowledge Planet: Join our community for deeper discussions.
“If you want to go fast, go alone. If you want to go far, go together.”
