As Systrace becomes increasingly feature-rich, combined with Android version iterations, the previous Systrace series tutorials have become somewhat outdated. Additionally, as my own skills have improved, I’ve been able to extract more information from Systrace, which has been very helpful in solving various performance issues. I need to document these skills to enhance my summarization and organization abilities, and if it helps those who read these articles, that would be excellent.
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.
As Google announced the deprecation of the Systrace tool and introduced Perfetto, Perfetto has essentially replaced Systrace in my daily work. Meanwhile, major manufacturers like OPPO and Vivo have also switched from Systrace to Perfetto. Many newcomers to Android performance optimization find Perfetto’s dazzling interface and complex features overwhelming, and they’ve been hoping I could present the previous Systrace articles using Perfetto.
This series aims to examine the overall operation of the Android system from a new perspective using Perfetto. Additionally, it provides a different angle for learning key modules such as App, Framework, and Linux. Although you may have read many articles about Android Framework, App development, and performance optimization, you might still feel confused because you can’t remember the code or don’t understand the execution flow. Through Perfetto, this graphical tool, you may gain a deeper understanding.
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
- Video (Bilibili) - Android Perfetto Basics and Case Studies
Systrace Series Article Index
This article serves as an index. After subsequent articles are updated, they will be aggregated here. The content is as follows:
- 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
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
Based on these points, I will leverage these advantages in my writing to bring you something different:
- 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 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: Welcome to join, thank you for your support~
One person can walk faster, but a group can walk further
